Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
du -m option to not go across mounts (you usually want to run that command to find what to destroy in that partition)
-a option to also list . files
-k to display in kilobytes
sort -n to sort in numerical order, biggest files last
tail -10 to only display biggest 10
you could save the code between if and fi to a shell script named smiley.sh with the first argument as and then do a smiley.sh to see if the command succeeded. a bit needless but who cares ;)
works well in crontab.
When dealing with system resource limits like max number of processes and open files per user, it can be hard to tell exactly what's happening. The /etc/security/limits.conf file defines the ceiling for the values, but not what they currently are, while
$ ulimit -a
will show you the current values for your shell, and you can set them for new logins in /etc/profile and/or ~/.bashrc with a command like:
$ ulimit -S -n 100000 >/dev/null 2>&1
But with the variability in when those files get read (login vs any shell startup, interactive vs non-interactive) it can be difficult to know for sure what values apply to processes that are currently running, like database or app servers. Just find the PID via "ps aux | grep programname", then look at that PID's "limits" file in /proc. Then you'll know for sure what actually applies to that process.
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
it compresses the files and folders to stdout, secure copies it to the server's stdin and runs tar there to extract the input and output to whatever destination using -C. if you emit "-C /destination", it will extract it to the home folder of the user, much like `scp file user@server:`.
the "v" in the tar command can be removed for no verbosity.