Check These Out
Convert DOS newlines (CR/LF) to Unix format using sed command
Instead of using force un-mounting, it's better to find the processes that currently use the relevant folder.
Taken from:
http://www.linuxhowtos.org/Tips%20and%20Tricks/findprocesses.htm
From the cwd, recursively find all rar files, extracting each rar into the directory where it was found, rather than cwd.
A nice time saver if you've used wget or similar to mirror something, where each sub dir contains an rar archive.
Its likely this can be tuned to work with multi-part archives where all parts use ambiguous .rar extensions but I didn't test this. Perhaps unrar would handle this gracefully anyway?
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.
Just the commands for the lvreduce I keep forgetting.
Overwrites the boot sector. Since this doesn't overwrite any data, you can usually recover by re-creating the partition table exactly the same as before you zeroed it. This can also help sometimes if you install a new drive in a Windows machine which can't read it.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.
$ sleep 1h ; sudo command
or
$ sudo sleep 1h ; sudo command
won't work, because by the time the delay is up, sudo will want your password again.
It may be helpful in case you need to umount a directory and some process is preventing you to do so keeping the folder busy. The lsof may process the +D option slowly and may require a significant amount of memory because it will descend the full dir tree. On the other hand it will neither follow symlinks nor other file systems.
Because Mac app bundles contain everything in one place, it makes running them from anywhere, including from a device such as a USB flash drive or external HDD, possible. So if your Mac has a mere 256GB of storage (as mine does), you can free up large quantities of disk space by storing apps like, say, Xcode on external devices.