Save Typing by Reusing All Arguments of the Previous Linux Command

You might want to reuse all of the arguments to a previous command in the shell if you realized you want to open the file with a different utility, but don’t feel like typing out the whole path again.

For instance, say you ran a cat on a file deep within a folder structure, like this:

cat /home/geek/documents/testfiles/testfile1

If you want to open that file up in vi, you don’t have to retype the whole command (or hit the up key and edit the command). Just type in the following:

vi !*

This would be expanded out to:

vi /home/geek/documents/testfiles/testfile1

Saves some typing, and just a useful command to know.

Article Save Typing by Reusing All Arguments of the Previous Linux Command compiled by Original article here

More stories

Setup Email Notifications for Dell Server Hardware Alerts

All Dell servers come with the Dell OpenManage Server Administrator software which has the ability to monitor and display system level indicators. Additionally, through the Alert Management tab you can configure actions to execute whenever an alert is triggered. Unfortunately there is no vehicle for

How to Mount a Remote Folder in Ubuntu

Gone are the days of finding a good FTP client and reading man pages trying to find out how the heck fuse works – mounting remote folders in Ubuntu nowadays is a breeze.

How to Turn a Rant Into a Productivity Power Tool

Ranting doesn’t have to be a waste of breathe and time. You can turn a rant into a powerful tool for productivity. Learn how to transform your sense of victim hood and irritability to self-empowerment and mental clarity.

Screenshot Tour: Microsoft Security Essentials 2.0 Beta

The new beta version of Microsoft Security Essentials was launched yesterday to a limited amount of users. Here we’ll take a look at what you expect from the new version of How-To Geek’s favorite PC security application.

Preview and Verify URLs in Internet Explorer 8

Would you like to see a preview of the websites behind regular, text only, and shortened URLs? You can easily see what is behind those links before opening them with the Preview and Launch URL accelerator for Internet Explorer 8.

List the 10 Largest Files or Directories on Linux

Linux has a rich set of commands for manipulating and accessing files. The du utility gives information on disk usage, and the sort utility can sort the results. Finally, we can run those results through the head command, which gives you the top 10 lines outputted through any other command. We’ll

How to Disable Login Sounds in Ubuntu

Nothing’s worse than booting up your laptop in a public place and subjecting everyone around you to the Ubuntu login sounds. We’ll show you how to disable both login sounds for good.