Srini's Point of View

My thoughts on technology, food and other fancies…

Manage directory navigation with pushd and popd

UNIX supports a wide variety of directory-navigation tools. Two good tools are pushd and popd.

You’re certainly aware that the cd command changes your current directory. What happens if you have several directories to navigate, but you want to be able to quickly return to a location? The pushd …

Reuse previous arguments

Here is another great tip from IBM. I love this. The !$ command returns the last argument used with a command. But what happens if you have a command that used arguments and you want to reuse just one of them?

The !:1 operator returns the argument used in a command …

Use history expansion

This post is from Unix tips from IBM. What happens if you’re using the same file name for a series of commands? Well, there’s a shortcut that can quickly retrieve the last file name you used.

What happens if you’re using the same file name for a …

More unix find tips

There are so many little things to remember in this command that I always have to lookup what switches to use. So here are a few ways of using find

To find all files modified in the last 24 hours (last full day) in current directory and its sub-directories:

find …