This page describes how to interact with the command line
In particular it addresses basic commands in the bash shell
You just opened a terminal in you favorite Linux distribution. A black window is facing you and a blinking cursor is prompting you for typing a command.
Here are the first commands that you may want to try:
The two commands above will create and remove directories in the file system.
The rm command will remove files and directories from the file system. You must Fear this command, or at least respect it.
The -r option of the rm command is particularly dangerous. It removes the content of a directory and all its subdirectories. Normally there is not a way of undoing this delete. Therefore, you must verify your current location in the file system before you use this command. Of course, you also want to verify that you really want to delete that directory and its content.
Our conscience is now clear, whatever happens to you, remember that we told you so !
along with their recursive options, that must be used very carefully since they can be dangerous
Hard links are a way of having a file appear in two directories and to have alternative filenames for the same content of bytes stored in disk.
Examples
ln /home/me/directoryA/myFile01.txt /home/me/directoryB/anotherName.txt
This example creates a second filename “anotherName.txt” in the “directoryB” for the ‘’content’’ of the file myFile01.txt.
The new filename “anotherName.txt” will link to the content even if the initial “myFile01.txt” filename is deleted.
Examples
ln -s /home/me/directoryA/myFile01.txt /home/me/directoryB/anotherName.txt
ln -s /home/me/directoryA/myFile01.txt /home/me/directoryB/
ln -s /home/me/directoryA /home/me/directoryC
The path to the original file or directory must be provided in a form that makes sense from the point of view of the location of the destination name. This means that the original name must be specified as one of the following: