Check These Out
Installs pip packages defining a proxy
Real DVD+R size is 4700372992 bytes, but I round down a little to be safe. To reconstitute use cat. "cat file.img.gz.aa file.img.gz.ab ..... > file.img.gz"
Grabs the cmdline used to execute the process, and the environment that the process is being run under. This is much different than the 'env' command, which only lists the environment for the shell. This is very useful (to me at least) to debug various processes on my server. For example, this lets me see the environment that my apache, mysqld, bind, and other server processes have.
Here's a function I use:
$ aa_ps_all () { ( cd /proc && command ps -A -opid= | xargs -I'{}' sh -c 'test $PPID -ne {}&&test -r {}/cmdline&&echo -e "\n[{}]"&&tr -s "\000" " "
or
echo '127.0.0.1 facebook.com' | sudo tee -a /etc/hosts
Do not execute this command if you don't know what you are doing.
I've corrected the function. My octal conversion formula was completely wrong. Thanks to pgas at http://mywiki.wooledge.org/BashFAQ/071 for setting me straight. The new function is from pgas and is very fast.
This is the same command as this one, but for OS X.
http://www.commandlinefu.com/commands/view/3053/find-out-when-your-billion-second-anniversary-is-was.
Place this code at the beginning of your script to ensure that it can only be executed by the root.
lists all files that are opened by processess named $processname
egrep 'w.+REG' is to filter out non file listings in lsof, awk to get the filenames, and sort | uniq to remove duplciation
Using this command you can track a moment when usb device was attached.
I've seen a lot of overly complicated attempts at figuring out "where am I?"
I think this is a part of the problem:
type -a pwd
force the use of the binary version of `pwd` instead of the built-in with "/bin/pwd -P"
-P option provides an absolute path to the present working directory
for the overly cautious type:
$(which pwd) -P