Changes between Version 12 and Version 13 of cypress/BasicLinuxComands


Ignore:
Timestamp:
08/19/15 17:56:01 (9 years ago)
Author:
cmaggio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/BasicLinuxComands

    v12 v13  
    327327These are just a couple examples of the many ways '''find''' can be used. A nice short tutorial on '''find''' with a lot of examples can be found at http://alvinalexander.com/unix/edu/examples/find.shtml
    328328
     329
     330=== Pipe ( | ) ===
     331
     332The pipe command, '''|''', takes the output of one command and passes it to another. For example we could "pipe" the output of '''cat''' to '''grep''' in order to search a file for a particular string
     333
     334{{{
     335[tulaneID@cypress1 examples]$ cat numbers.txt | grep 1
     33601
     33710
     338[tulaneID@cypress1 examples]$
     339}}}
     340
     341=== history ===
     342Displays the command history list with line numbers. You can add an optional integer, n, argument to display only the last n commands
     343
     344{{{
     345[tulaneID@cypress1 examples]$ history 2
     346  299  cat numbers.txt | grep 1
     347  300  history 2
     348[tulaneID@cypress1 examples]$
     349}}}
     350
     351Note: '''history''', '''|''', and '''grep''' when used together are a powerful combination as they allow you to search for old commands that you may not remember the exact syntax for:
     352
     353{{{
     354[tulaneID@cypress1 examples]$ history | grep chmod
     355  153  chmod u+x myscript.sh
     356  204  chmod +x myexecutable.sh
     357  271  chmod +x myscript.sh
     358  273  chmod -x myscript.sh
     359  301  history | grep chmod
     360[tulaneID@cypress1 examples]$
     361}}}
     362
    329363== Advanced Linux Commands ==
    330364