User Tools

Site Tools


wiki:options2018

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:options2018 [2018/07/26 14:51]
david separate $ spaces
wiki:options2018 [2018/08/23 04:59] (current)
erin
Line 2: Line 2:
 --> Quiz\\ --> Quiz\\
 --> Assignment\\ --> Assignment\\
---> Further Exercises\\ 
 --> Canvas\\ --> Canvas\\
 --> Summit --> Summit
Line 28: Line 27:
 Further, short options can often be lumped together. Further, short options can often be lumped together.
  
-For example, the following commands do the same thing...+For example, the following commands ​//​should// ​do the same thing...
  
 <code bash> <code bash>
Line 35: Line 34:
 </​code>​ </​code>​
  
-And these commands do the same thing...+And these commands ​//​should// ​do the same thing...
  
 <code bash> <code bash>
Line 43: Line 42:
 </​code>​ </​code>​
  
-:!: **Exercise**:​ Let's obtain a dataset to allow us to explore ''​ls'':​+ 
 +---- 
 + 
 + 
 +:!::!::!: **Exercise**:​ Let's obtain a dataset to allow us to explore ''​ls'':​
  
   * Download the following file: {{:​wiki:​160825_options_ex.tgz|}} ​   * Download the following file: {{:​wiki:​160825_options_ex.tgz|}} ​
   * Using Finder/​Explorer,​ navigate to the location where you downloaded the file.   * Using Finder/​Explorer,​ navigate to the location where you downloaded the file.
   * Double click on the .tgz file to decompress it.   * Double click on the .tgz file to decompress it.
 +
 +;-) **Quick Tip**: If double clicking on the "​tarball"​ doesn'​t open it, try using tar on the command line:
 +
 +<code bash>
 +$ tar -zxvf 160825_options_ex.tgz
 +</​code>​
 +
 +
   * If you need to, move the resulting expanded directory and its contents to a location you can easily manipulate in the terminal.   * If you need to, move the resulting expanded directory and its contents to a location you can easily manipulate in the terminal.
   * Open your terminal and navigate (''​cd'',​ ''​pwd'',​ ''​ls''​) to the directory ''​160825_options_ex''​.   * Open your terminal and navigate (''​cd'',​ ''​pwd'',​ ''​ls''​) to the directory ''​160825_options_ex''​.
Line 53: Line 64:
 :!: **Exercise**:​ Try executing ''​ls''​ commands: :!: **Exercise**:​ Try executing ''​ls''​ commands:
  
-  * Convince yourself that ''​ls -a''​ and ''​ls <​nowiki>​--all</​nowiki>​'' ​do the same thing.+  * Try ''​ls -a --h''​
   * Try ''​ls -alh''​   * Try ''​ls -alh''​
-  * Which combination of ''​ls''​ options would you execute to list the contents in the following order and format:+  * Which combination of ''​ls''​ options would you execute to list the contents in the following order and format?:
 <code bash> <code bash>
 total 184 total 184
Line 65: Line 76:
 -rw-r--r--@ 1 erinonish ​ staff    44K Aug 24 19:37 dm6_chrom_sizes.txt -rw-r--r--@ 1 erinonish ​ staff    44K Aug 24 19:37 dm6_chrom_sizes.txt
 </​code>​ </​code>​
 +
 +
 +----
 +
 +=== Manuals ===
 +
 +Reading a book or a webpage about options can sometimes lead you astray. This is because different commands work differently across different linux "​distros"​. Sometimes the manual for a given command is more useful.
 +
 +**//Manual Usage//** \\
 +**man** <​command_name>​
 +
 +<code bash>
 +$ man ls
 +</​code>​
 +
 +:!: Use the **SPACE** bar to navigate through the manual pages.
 +
 +:!: Use **Q** to quit out of the manual pages.
 +
 +:!: I hate to tell you this, but sometimes the man pages are also inaccurate. ​
  
 [[wiki:​make2018|{{:​wiki:​slide2_arrow.png?​40|}}]] [[wiki:​make2018|Making & Removing]] [[wiki:​make2018|{{:​wiki:​slide2_arrow.png?​40|}}]] [[wiki:​make2018|Making & Removing]]
wiki/options2018.1532638280.txt.gz · Last modified: 2018/07/26 14:51 by david