2,187
edits
m (→NTP / Date and Time: Added ntpq) |
m (→File Contents (Inspection and Manipulation): Added addition grep cmd) |
||
Line 77: | Line 77: | ||
|<code> diff <file1> <file2> </code> || Difference between two files | |<code> diff <file1> <file2> </code> || Difference between two files | ||
|- | |- | ||
|<code> grep <find> <file> </code> || | |<code> grep <find> <file> </code> || Show all lines with occurrences of ''find'' in ''file'' | ||
|- | |||
|<code> grep -A <n> -B <m> <find> <file> </code> || As above, but additionally show the ''n'' lines after and ''m'' lines before | |||
|- | |- | ||
|<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) |