/bin/kill -9 `/bin/cat /var/run/snmpd.pid`
To kill just the PID reported by the process as the active PID (with a shotgun, -9) and nothing else, use this shortcut.
This is a repository of all of my Linux/Unix writings as well as useful tips and tricks for systems administration, engineering, and programming.
Tuesday, November 29, 2011
Thursday, November 3, 2011
sed add line at end of file
If you want to add a a line of text to the end of a file, and want to do the edit in place, use this syntax:
sed -i '$ a\This is some sample text.' /foo/bar
sed -i '$ a\This is some sample text.' /foo/bar
Subscribe to:
Posts (Atom)