Difference between revisions of "Linux"

Jump to navigation Jump to search
241 bytes added ,  07:37, 19 August 2010
→‎Commands: Added find and watch
(→‎Commands: Added lsof)
(→‎Commands: Added find and watch)
Line 18: Line 18:
|-
|-
|<code> more <file> </code>              || Views a file (read only), <code>q</code> to exit, <code>+line</code> to start from line
|<code> more <file> </code>              || Views a file (read only), <code>q</code> to exit, <code>+line</code> to start from line
|-
|<code> find /path/ -iname "*FILENAME*" </code> || Find file with ''*filename*'' in ''path''
|-
|<code> watch -d "ls -lt *.vmdk ;date" </code> || Watch modifications occurring to files matching ''*.vmdk''
|-
|-
|<code> diff <file1> <file2> </code>      || Difference between two files
|<code> diff <file1> <file2> </code>      || Difference between two files
|-
|-
|<code> grep <find> <file> </code>        || Find all occurrences in file
|<code> grep <find> <file> </code>        || Find all occurrences of ''find'' in ''file''
|-
|-
|<code> tail <file> </code>              || Displays the last 10 lines of a file, <code>-f</code> follows any updates (eg to monitor a log file)
|<code> tail <file> </code>              || Displays the last 10 lines of a file, <code>-f</code> follows any updates (eg to monitor a log file)
Line 39: Line 43:
|<code> ifconfig </code>                  || Interface config (Unix equiv of Windows' ipconfig)
|<code> ifconfig </code>                  || Interface config (Unix equiv of Windows' ipconfig)
|-
|-
|<code> ps fx | grep <proc> </code>      || Find running process info
|<code> ps fx <nowiki>|</nowiki> grep <proc> </code>      || Find running process info
|-
|-
|<code> kill <pid> </code>                || Kill a process
|<code> kill <pid> </code>                || Kill a process

Navigation menu