Changes between Version 5 and Version 6 of cypress/BasicLinuxComands
- Timestamp:
- 08/18/15 19:20:47 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
cypress/BasicLinuxComands
v5 v6 28 28 }}} 29 29 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 ..''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 ..'' 31 31 32 32 {{{ … … 75 75 [tulaneID@cypress1 ~]$ cd testdir 76 76 [tulaneID@cypress1 ~]$ pwd 77 / u00/user/testdir77 /home/tulaneID/testdir 78 78 }}} 79 79 … … 96 96 97 97 If 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 {{{ 99 99 [tulaneID@cypress1 ~]$ rm -rf testdir 100 100 [tulaneID@cypress1 ~]$ ls testdir 101 101 ls: cannot access testdir: No such file or directory 102 }} 102 }}} 103 103 104 104 === cp === … … 124 124 }}} 125 125 Unlike '''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 -s133 Disk quotas for user tulaneID (uid 12345):134 Filesystem blocks quota limit grace files quota limit grace135 master.10ge.cluster:/home136 6459M 10000M 10000M 23260 250k 250k137 master.10ge.cluster:/share/apps138 6459M 10000M 10000M 23260 250k 250k139 }}}140 126 141 127 === cat === … … 152 138 }}} 153 139 140 === tail === 141 Displays lines from the end of a file. Useful for viewing recent results in an output file. 142 {{{ 143 [tulaneID@cypress1 ~]$ cat animals 144 dog 145 Dog 146 cat 147 Racoon 148 DOG 149 bullfrog 150 Little Doggie 151 152 [tulaneID@cypress1 ~]$ tail -3 animals 153 DOG 154 bullfrog 155 Little Doggie 156 }}} 157 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. 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 163 dog 164 Dog 165 }}} 166 154 167 === more === 155 168 '''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. 156 169 170 == Basic Linux Commands Exercise == 171 172 Lets 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 === 179 Display disk quotas. 180 181 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. 182 {{{ 183 [tulaneID@cypress1 ~]$quota -s 184 Disk quotas for user tulaneID (uid 12345): 185 Filesystem blocks quota limit grace files quota limit grace 186 master.10ge.cluster:/home 187 6459M 10000M 10000M 23260 250k 250k 188 master.10ge.cluster:/share/apps 189 6459M 10000M 10000M 23260 250k 250k 190 }}} 191 157 192 === grep === 158 193 Find text in a file. '''grep''' will return every line in the file that matches your search term. … … 195 230 bullfrog 196 231 }}} 232 233 == Advanced Linux Commands == 197 234 198 235 === sed === … … 234 271 For more information on awk please visit [[http://www.grymoire.com/Unix/Awk.html|Awk - A Tutorial and Introduction]]. 235 272 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 animals240 dog241 Dog242 cat243 Racoon244 DOG245 bullfrog246 Little Doggie247 248 [tulaneID@cypress1 ~]$ tail -3 animals249 DOG250 bullfrog251 Little Doggie252 }}}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.