Unix/Linux Quickies …
A few helpful *nix commands (aka brain dump … it’s too full) …
-
Archive only a specific type of files within a dir and all subdirs, preserving file paths in the archive:
tar -czvf config-files-20071116.tgz `find . -name "*.cfg"` -
Kill a running process, the easy way:
pkill processString
(processString can be any portion of the command running to be killed - e.g.pkill firefox) -
Get the PID of a running process, the easy way:
pgrep processString
(processString can be any portion of the command running - e.g.pgrep firefoxcould return 1123) -
Disable email notification to the owner of the cron, from a running cron entry:
Add “> /dev/null 2>&1” to the end of the cron job line (means send any standard output to/dev/nulland redirect standard error (2) to standard output (1)).
h u g h
About this entry
You’re currently reading “Unix/Linux Quickies …,” an entry written by Hugh
- Published:
- 11.16.07 / 9pm
- Category:
- unix/linux
7thgroove
No comments
Jump to comment form | comments rss [?] | trackback uri [?]