Changes between Version 5 and Version 6 of cypress/BasicLinuxComands


Ignore:
Timestamp:
Aug 18, 2015 7:20:47 PM (6 years ago)
Author:
cmaggio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/BasicLinuxComands

    v5 v6  
    2828}}}
    2929
    30 As you can see, NextDirectoryDown is a ''subdirectory'' of tulaneID. And tulaneID is itself a subdirectory of home, which is a subdirectory of the root directory (/). Thus, the directories form a downward facing tree with all directories stemming from the root directory. You can move on level up in the try by typing '''cd ..''
     30As you can see, !NextDirectoryDown is a ''subdirectory'' of tulaneID. And tulaneID is itself a subdirectory of home, which is a subdirectory of the root directory (/). Thus, the directories form a downward facing tree with all directories stemming from the root directory. You can move on level up in the try by typing '''cd ..''
    3131
    3232{{{
     
    7575[tulaneID@cypress1 ~]$ cd testdir
    7676[tulaneID@cypress1 ~]$ pwd
    77 /u00/user/testdir
     77/home/tulaneID/testdir
    7878}}}
    7979
     
    9696
    9797If you are confident with the command line and your understanding of file locations you can use the ''f'' flag instead of ''i'' to force deletion of all files without prompting:
    98 {{
     98{{{
    9999[tulaneID@cypress1 ~]$ rm -rf testdir
    100100[tulaneID@cypress1 ~]$ ls testdir
    101101ls: cannot access testdir: No such file or directory
    102 }}
     102}}}
    103103
    104104=== cp ===
     
    124124}}}
    125125Unlike '''cp''', the '''mv''' command does not create a second instance of the file or directory.
    126 
    127 === quota ===
    128 Display disk quotas.
    129 
    130 The '-s' flag translates the output into a readable format. If your blocks column is equal to or greater than the quota column, you have exceeded your available disk space.
    131 {{{
    132 [tulaneID@cypress1 ~]$quota -s
    133 Disk quotas for user tulaneID (uid 12345):
    134      Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
    135 master.10ge.cluster:/home
    136                   6459M  10000M  10000M           23260    250k    250k       
    137 master.10ge.cluster:/share/apps
    138                   6459M  10000M  10000M           23260    250k    250k     
    139 }}}
    140126
    141127=== cat ===
     
    152138}}}
    153139
     140=== tail ===
     141Displays lines from the end of a file. Useful for viewing recent results in an output file.
     142{{{
     143[tulaneID@cypress1 ~]$ cat animals
     144dog
     145Dog
     146cat
     147Racoon
     148DOG
     149bullfrog
     150Little Doggie
     151
     152[tulaneID@cypress1 ~]$ tail -3 animals
     153DOG
     154bullfrog
     155Little Doggie
     156}}}
     157The ''-f'' flag can be used to tail a file interactively. New additions to the end of the file will be printed to your screen.
     158
     159=== head ===
     160'''head''' is much like '''tail''', except it prints from the top of a file.
     161{{{
     162[tulaneID@cypress1 ~]$ head -2 animals
     163dog
     164Dog
     165}}}
     166
    154167=== more ===
    155168'''more''' is like '''cat''', except it prints the file one page at a time. The spacebar is used to continue on to the next page.
    156169
     170== Basic Linux Commands Exercise ==
     171
     172Lets take a break from lecture to practice some of the commands we've just learned
     173
     174[[cypress/BasicLinuxComands/Exercise|Basic Commands Exercise]]
     175
     176== Intermediate Linux Commands ==
     177
     178=== quota ===
     179Display disk quotas.
     180
     181The '-s' flag translates the output into a readable format. If your blocks column is equal to or greater than the quota column, you have exceeded your available disk space.
     182{{{
     183[tulaneID@cypress1 ~]$quota -s
     184Disk quotas for user tulaneID (uid 12345):
     185     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     186master.10ge.cluster:/home
     187                  6459M  10000M  10000M           23260    250k    250k       
     188master.10ge.cluster:/share/apps
     189                  6459M  10000M  10000M           23260    250k    250k     
     190}}}
     191
    157192=== grep ===
    158193Find text in a file. '''grep''' will return every line in the file that matches your search term.
     
    195230bullfrog
    196231}}}
     232
     233== Advanced Linux Commands ==
    197234
    198235=== sed ===
     
    234271For more information on awk please visit [[http://www.grymoire.com/Unix/Awk.html|Awk - A Tutorial and Introduction]].
    235272
    236 === tail ===
    237 Displays lines from the end of a file. Useful for viewing recent results in an output file.
    238 {{{
    239 [tulaneID@cypress1 ~]$ cat animals
    240 dog
    241 Dog
    242 cat
    243 Racoon
    244 DOG
    245 bullfrog
    246 Little Doggie
    247 
    248 [tulaneID@cypress1 ~]$ tail -3 animals
    249 DOG
    250 bullfrog
    251 Little Doggie
    252 }}}
    253 The ''-f'' flag can be used to tail a file interactively. New additions to the end of the file will be printed to your screen.
    254 
    255 === head ===
    256 '''head''' is much like '''tail''', except it prints from the top of a file.