End User Manual:The Shell


SUBMITTED BY: bicoinvaluebr

DATE: Jan. 25, 2016, 11:23 a.m.

FORMAT: Text only

SIZE: 2.0 kB

HITS: 266

  1. The cursor blinks, waiting for input. To this, some of the more used and useful commands include:
  2. ls – list files in the current directory.
  3. cd – change working directory. If your current path is /home/username/Trash for instance, typing “cd” will bring you back to /home/username.
  4. mkdir – make a new directory
  5. rmdir – delete (remove) a directory (must be empty)
  6. cp – (copy) invoked such as “cp currentFile newFile”, and is used to copy files.
  7. mv – invoked such as “mv currentLocation newLocation”. This is used to either move or rename files.
  8. rm – invoked such as “rm myFile”; it is used to delete (remove) files permanently.
  9. pwd – outputs ('prints) the working (current) directory.
  10. cat – concatenate files (can be used to join them together), and prints its output to standard output (the terminal screen). Used like: “cat myFile”.
  11. less – allows for file viewing in the shell, and is most useful for text files; invoked like “less myFile”. (Less is a more advanded version of an older utillity more. A hacker joke.)
  12. find – can be used to find files via the command line. Example usage could be: “find . -name toc”, which looks at the current directory (defined by “.”) for any files with the name “toc”.
  13. locate – picks entries from a database, that is updated regularly; invoked via “locate myFile”. Its much quicker than find (since it only searches a database), but might not be as quick to update as find (the update of the database might happen once every day only).
  14. date – display the current date! This can also be used to set the date of the system (but administrator privileges are required).
  15. history – built-in shell command for the BASH environment that shows the last run commands.
  16. As always, these commands just begin to scratch the surface of the capability of the shell. There are thousands of such commands available on your system! And keep in mind that each and every command comes with options, that are usually executed via the -flag – again, the man pages list all useful commands. For instance the command

comments powered by Disqus