Little bash programming

Scott plug-discuss@lists.plug.phoenix.az.us
Wed, 10 Jul 2002 22:40:28 -0700 (MST)


On Wed, 10 Jul 2002, Kevin Brown wrote:

> hmm, command-line quickies?
> 
> "cd -" : takes you to the last directory you were in.  Good way to bounce
> between two directories in far areas of the filesystem.
> "cd ~" or "cd" : takes you to your home directory.
> "rpm -qa | grep <text>" : find a package if it was installed.
> "tail -f <file>" : watch a file as it changes.  Can't think of a way to do this
> in Windows and notepad can't deal with large text logs.  Would hate to think
> what would happen opening the logs in Word.
> 
> can't think of any other quicky command-line tricks, but most commonly used unix
> commands for me are (in no particular order): cd, ls, grep, rpm, sed, awk, vi,
> man, and tail.
> 
> Anyone want to expand on this?
> 
you can copy or move a file like so:

cp some_file{.ext,.newext}
mv some_file{.ext,.newext}

cant think of anything else at the moment.

scott