Day Zero: The Linux Command Line


First of all, I learned a few basic technique of Bash Shell, such as commands cd, ls, etc. Likewise, I also learned the basic skills of Vim.

The interesting and useful things I found in the book today, and I should remember these is:

  • cd – : Changes the working directory to the previous working directory.
  • ls pathA pathB : Displays two pathway at the same time.
  • command -option argument:
    • ls -lt -r : list the files included in the directory by long format output, the file’s modification time, and reverses the order of the sort.common_ls_options
  • file filename : printing the content of the file. (I tried out if combining the file with -l, the result is totally unreadable and I do not understand at all)unknown
  • Less command is more.
  • Copy from the other place, and paste it into the terminal by the middle click.
  • I just do not know what is the difference between shell builtin and executable program.
  • apropos = man -k; I also do not acknowledge of the gravity of info and man, which is too complicate for myself to understanding their contents. I prefer searching on the internet if I have questions of a command rather looking in these.
  • make your own command: alias name = ‘strings’, for examples: alias foo = ‘cd usr/bin’. Likewise, you can unalias this later. Checking, however, whether the name is already be used by typing type name first.
  • ls -l /bin/usr &>> ls_output.txt : appending the standard output and standard error streams to the ls_output.txt for recording.  ls -l /bin/usr &> ls_output.txt is also working but displays only one message of two, standard output or standard error streams.
  • ls -l /bin/usr &> /dev/null : deliver the output file into trash collector.
  • cat : is able to combine files with wildcards, likewise, it is perfect for viewing file along with | less, for instance, cat /usr/bin | less; cat a0*.txt > a.txt / I have a question: is cat acting like a buffer for storing the text temporarily?
  •  Filters:  ls patten diretories| sort (sorts alphabetically) | uniq (dismisses the duplications) | wc (word counting) | grep ABC (displays the filename containing ABC)| head/tail -n # (displays the first or last # lines: utilized with files and directories) | less / the filter programs are also available in front of the pattern, likes sort pattern directories.
  • Bookmark: Page 91

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s