Check These Out
Catches .swp, .swo, .swn, etc.
If you have access to lsof, it'll give you more compressed output and show you the associated terminals (e.g., pts/5, which you could then use 'w' to figure out where it's originating from): lsof | grep '\.sw.$'
If you have swp files turned off, you can do something like: ps x | grep '[g,v]im', but it won't tell you about files open in buffers, via :e [file].
Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted.
Inspired by the excellent EVACopy http://evacopy.sourceforge.net
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.
This is the solution to the common mistake made by sudo newbies, since
$ sudo echo "foo bar" >> /path/to/some/file
does NOT add to the file as root.
Alternatively,
$ sudo echo "foo bar" > /path/to/some/file
should be replaced by
$ echo "foo bar" | sudo tee /path/to/some/file
And you can add a >/dev/null in the end if you're not interested in the tee stdout :
$ echo "foo bar" | sudo tee -a /path/to/some/file >/dev/null
Found at: http://forums.virtualbox.org/viewtopic.php?t=52
host B (you) redirects a modem port (62220) to his local ssh.
host A is a remote machine (the ones that issues the ssh cmd).
once connected port 5497 is in listening mode on host B.
host B just do a
ssh 127.0.0.1 -p 5497 -l user
and reaches the remote host'ssh. This can be used also for vnc and so on.
In this example the command "somecommand" will be executed and sent a SIGALARM signal if it runs for more than 10 seconds. It uses the perl alarm function. It's not 100% accurate on timing, but close enough. I found this really useful when executing scripts and commands that I knew might hang E.g. ones that connect to services that might not be running. Importantly this can be used within a sequential script. The command will not release control until either the command completes or the timeout is hit.
Taken from here: http://linsovet.com/directory-usage-size-sorted-list
This will diff your local version of the file with the latest version in svn. I put this in a shell function like so:
$svd() { vimdiff
Replace 'csv_file.csv' with your filename.