Category Server Setup

restart service over ssh

I recently ran in to trouble restarting neo4j over ssh here’s the fix: From machine calling neo4j host ssh -f $USER@$HOST ‘sh -c “( (nohup sudo restart 2>&1 >output.file </dev/null) & )”‘ Target Machine Sudoers Replace “someuser” with whatever…

egrep valid ip address

Example to egrep valid ip address To egrep all valid ip addresses in current directory: egrep -r ‘[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}’ . An Alternative: /bin/egrep ‘\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b’

linux view disk space usage

Disk Space Usage Visual Tools Some great tools for viewing disk space usage are: pydf (essential df with colors) Philesight (Web-based implementation of Filelight) ncdu (awesome text-only GUI!) Philesight Philesight is a tool to browse your filesystem and see where…