Useful Commands.Pdf

Useful Commands.Pdf

Lab Guideline Bash: Bash is a free software Unix shell written for the GNU Project. Switch to Bash if you want to use backspace key at terminal. Pico: Pico (Pine composer) is a text editor for Unix and Unix-based computer systems. In our course, Pico is the main text edit we will use for C programming. You can type ‘pico’ to run the edit. Useful commands: ls: Lists the contents of a directory. You can add options like -l to show more information about the files. cd: Changes the directory. And you can type ‘cd ..’ to go back one directory. pwd: Print the working directory (the current directory you are in). mkdir: Makes directories. rmdir: Deletes a directory. It can not be used to remove the directory which contains files. cp: Copies files from one location to another. mv: Renames a file or moves it from one directory to another directory. rm: Deletes a file without confirmation (by default). chmod: Changes the permission of a file. grep: Finds text within a file. cat/more/less: cat: Allows you to look, modify or combine a file. more: Allows information to be displayed one page at a time. less: Opposite of the more command. Can use up/down arrow and search function in less command. wc: Short for word count, wc displays a count of lines, words, and characters in a file. Pipe and redirect: >: redirect the standard output. (e.g.: ls -l > output.txt) >>: redirect the standard output and append. (e.g.: ls -l >> output.txt) |: pipe. Take the output of the first command and treat it as the input for the second one. (e.g.: ls -l | wc ) .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us