Sunday, October 08, 2006

Renaming a File

So you want to rename a file? You will need to use the mv utility, which is short for move. Here's what you will need to do.

mv orginalfilename newfilename

e.g.
#mv esotfhub.dat esofthub.dat
or #mv -f esotfhub.dat esofthub.dat (the -f option forces the command -- turns off interactive mode)

If you want to move the contents of a file or directory to another partition, it behaves like the cp (copy) utility. Here's the exception -- it deletes the original source file/directory once its task is completed unlike cp.

No comments: