Check These Out
Splits the file "my_file" every 500 lines. Will create files called xx01 xx02 and so on. You can change the prefix by using the -f option. Comes in handy for splitting logfiles for example. I am using it for feeding a logfile parser with smaller files instead of one big file (due to performance reasons)
replace username, password, and nameofnewfriend with proper values. Remember to escape things like ! or & in your password
Suppose you made a backup of your hard disk with dd:
dd if=/dev/sda of=/mnt/disk/backup.img
This command enables you to mount a partition from inside this image, so you can access your files directly.
Substitute PARTITION=1 with the number of the partition you want to mount (returned from sfdisk -d yourfile.img).
this is helpful because dmesg is where i/o errors, etc are logged to... you will also be able to see when the system reboots or someone attaches a thumb drive, etc.
don't forget to set yourself up in /etc/aliases to get roots email.
substrings a variable starting at position.
If no offset given prints rest of the line
Referring to the original post, if you are using $! then that means the process is a child of the current shell, so you can just use `wait $!`. If you are trying to wait for a process created outside of the current shell, then the loop on `kill -0 $PID` is good; although, you can't get the exit status of the process.
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.
This command displays a simple menu of file names in the current directory. After the user made a choice, the command invokes the default editor to edit that file.
* Without the break statement, the select command will loop forever
* Setting the PS3 prompt is optional
* If the user types an invalid choice (such as the letter q), then the variable $f will become an empty string.
* For more information, look up the bash's select command
Better tool for exporting git's repository is Git itself!