December 2012
Intermediate to advanced
888 pages
48h 24m
English
To delete a file named filename, use this command:
matthew@seymour:~$ rm filename
You can remove a directory in a different location by changing what is after rm. To remove a directory in /home/matthew/randomdirectory, if I am already in my /home directory, I can use the following:
matthew@seymour:~$ rm randomdirectory/filename
Or from anywhere using an absolute path, I can use this:
matthew@seymour:~$ rm /home/matthew/randomdirectory/filename
Or from anywhere using a path shortcut, I can use the following command:
matthew@seymour:~$ rm ~/randomdirectory/filename
If you try to use rm to remove an empty directory, you will receive an error message: rm: cannot remove `random/': Is a directory. In this case, ...
Read now
Unlock full access