Moving a file to a different directory | |
Previously, we saw that the mv command can be used to change the name of a file.
The mv command can also be used to move a file from one directory to another. For example, this command would move file ~/potatoes to directory /u/trixie/typos:
% mv ~/potatoes /u/trixie/typosAfter the execution of this command, the pathname of the file should be
/u/trixie/typos/potatoes.Getting rid of a directory | |
You can remove unwanted directories with the rmdir command, provided that they contain no files (see `Getting rid of unwanted files').
For example, to remove a directory named newton:
% rmdir newton
No comments:
Post a Comment