Removing a symlink removes only the link. It has no effect on the linked-to file. Removing the only hard link to a file removes the file.

cd to your home directory. ln with the -s option makes a symbolic link - in this case, one called MyTmp that points to the filename /tmp/me.

Debian GNU/Linux : Guide to Installation and Usage — Part 83

lrwxrwxrwx 1 havoc havoc 7 Dec 6 12:50 MyTmp -> /tmp/me

Debian GNU/Linux : Guide to Installation and Usage — Part 83

The date and user/group names will be different for you, of course. Notice that the file type is l, indicating that this is a symbolic link. Also notice the permissions: Symbolic links always have these permissions. If you attempt to chmod a symlink, you’ll actually change the permissions on the file being pointed to.

Debian GNU/Linux : Guide to Installation and Usage — Part 83

You will get a No such file or directory error, because the file /tmp/me doesn’t exist. Notice that you could create a symlink to it anyway.

Removes the symbolic link. Notice that this removes the link, not what it points to. Thus you use rm not rmdir.

Lets you clean up after yourself. symlinks!removing

Device files refer to physical or virtual devices on your system, such as your hard disk, video card, screen, and keyboard. An example of a virtual device is the console, represented by /dev/console.

There are two kinds of devices:character and block. _Character devices_ can be accessed one character at a time. Remember the smallest unit of data that can be written to or read from the device is a character (byte).

_Block devices_ must be accessed in larger units called blocks, which contain a number of characters. Your hard disk is a block device.

You can read and write device files just as you can from other kinds of files, though the file may well contain some strange incomprehensible-to-humans gibberish. Writing random data to these files is probably a bad idea. Sometimes it’s useful, though. For example, you can dump a postscript file into the printer device /dev/lp0 or send modem commands to the device file for the appropriate serial port.

/dev/null / / / /dev/null is a special device file that discards anything you write /to it. If you don’t want something, throw it in /dev/null. It’s essentially a bottomless pit. If you read /dev/null, you’ll get an end-of-file (EOF) character immediately. /dev/zero is similar, except that you read from it you get the \0 character (not the same as the number zero).