From LedHed's Wiki
Jump to: navigation, search
 
Line 11: Line 11:
 
  tail -f /path/to/log/filename | grep -i 'FilterStringHere'<br>
 
  tail -f /path/to/log/filename | grep -i 'FilterStringHere'<br>
 
<br>
 
<br>
 
+
'''Dump a .conf file to a new file without the comments (#)'''<br>
 
+
grep -v '#' file.conf > newfile.conf<br>
'''Dump a .conf file to a new file without the comments (#)'''
+
grep -v '#' file.conf > newfile.conf
+
  
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Revision as of 17:14, 7 September 2006

Tips -N- Tricks

Search command history

grep -i 'SearchStringHere' ~/.bash_history


View Log Continuously

tail -f /path/to/log/filename

or

Filter a continuous log for a specific entry

tail -f /path/to/log/filename | grep -i 'FilterStringHere'


Dump a .conf file to a new file without the comments (#)

grep -v '#' file.conf > newfile.conf