I'll probably add more as I find them.
http://serverfault.com/questions/4176/what-sysadmin-things-should-every-programmer-know
This answer to the above specifically covers how to debug networking issues for devs:
http://serverfault.com/a/4303/75301
A Small List of Best Practices for Sysadmins and Programmers - has a lot of links to other helpful pages
Linux: 25 PHP Security Best Practices For Sys Admins
Thursday, October 30, 2014
Thursday, October 2, 2014
grep in a bunch of files
I always have to look this up so I'm posting a note to myself here. To grep through all the files in a directory, recursively, and only get back a list of the files containing the string, do
E.g.:
Found this in this blog.
$ grep -lr "searchterm" location
E.g.:
$ grep -lr "Enum" /var/log/rtr/pops
$ grep -lr "receipt" .
Friday, September 5, 2014
Avoid error messages with `find` in *nix
Very useful comment on StackOverflow about how to get rid of error messages that come up when you use `find`.
You do not need sudo to run find for generally-accessible commands. If you don't want to see the error messages about inaccessible directories, get rid of the messages rather than using root privs unnecessarily. Using sudo all the time is a bad habit. Redirect stderr to /dev/null, like this:
find / -name java 2> /dev/null
Walter Underwood on SO
Subscribe to:
Posts (Atom)