Deleting files in Linux

Use the following command to delete a directory and its files

rm -rf directory

or in a more complicated way

find dirname ! -type d -exec rm \{\} \;

where dirname is the root of the directory tree you want to delete.

Colour PuTTY directory listing

You can get a colour display of directory listings by adding the options –color=tty to the command. If you want to make this permanent, then just add an alias to your start up file.

Adding the option -F and will add a single character to the end of the file name.

File Type Symbol Colour
Directory / Dark Blue
File, Hard Link None White
Symbolic Link @ Light Blue (Cyan)
Executable * Bright Green
FIFO file (Named Pipe) | Sage
Block Device None Orange
Character Device None Orange
Socket File = Cerise
Orphaned Link x Unknown
Broken Link x Unknown
Whiteout File % Unknown