Check These Out
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 EVACopy http://evacopy.sourceforge.net
This command will dump a database on a remote stream to stdout, compress it, stream it to your local machine, decompress it and put it into a file called database.sql.You could even pipe it into mysql on your local machine to restore it immediately. I had to use this recently because the server I needed a backup from didn't have enough disk space.
scan whole specific network for active online ips
Useful to add a timestamp to every line printed to stdout.
You can use `-Ins` instead of `-Iseconds` if you want more precision.
Acquires a bit-by-bit data image, gzip-compresses it on multiple cores (pigz) and encrypts the data for multiple recipients (gpg -e -r). It finally sends it off to a remote machine.
This shell function takes a single argument, which is used as the base name of the .wav, .timing and .session files created. To create a screencast:
$ screencast test
type and talk ...
then type 'exit' or to exit the screencast.
test.wav will contain the audio from your screencast.
test.session will contain text and control characters needed to paint the screen
test.timing will contain timing information needed to synch individual keystrokes in test.session with the audio.
to play back:
$ aplay test.wav & scriptreplay test.{timing,session}
NOTE: because the shell function uses the variable "$!", and bash likes to expand '!' during history expansion, you will need to turn off bash's history before you enter the shell function.
This can be achieved using the command
$set +H
Programs for locking and unlocking files and mailboxes.This package includes several programs to safely lock and unlock files and mailboxes from the command line. These include:
lockfile-create
lockfile-remove
lockfile-touchlock
mail-lock
mail-unlock
mail-touchlock
These programs use liblockfile to perform the file locking and unlocking, so they are guaranteed compatible with Debian's file locking policies.
Replace 'csv_file.csv' with your filename.
This command will let you just type c-a b (which means press 'ctrl' then 'a' then 'b'), and screen will save your copy buffer to /tmp/screen-exchange, and then execute xsel to copy the contents of that file into the system's X clipboard.
1. Install Conrad Parker's xsel from http://www.vergenet.net/~conrad/software/xsel/
2. Add these lines to your .screenrc
# Add cool line to make copying to x clipboard possible.
# This binds C-a b to copy screen's copy buffer to the system clipboard.
bind b eval writebuf 'exec /bin/sh -c "xsel -i -b < /tmp/screen-exchange"' 'exec /bin/sh -c "killall xsel"'
3. Restart screen.
4. Test it by typing c-a [ to enter copy mode.
5. Select some text using vi movement keys (h, j, k, l, etc...) and starting your selection by hitting the space bar, moving with vi movement keys, and then ending your selection with the space bar.
6. Type C-a b, and screen will use xsel to copy your screen copy buffer to the system's X clipboard buffer.
7. Then you can paste the screen copy buffer into any X program.
Note: If you're using Mac OSX, you can use pbcopy instead of xsel.
Also Note: The second exec in the .screenrc file, which runs killall on xsel, is necessary, because even when you redirect a file to xsel, xsel waits for you to press ctrl-c to kill it, and have it stop waiting for more input. Since xsel forces screen to wait, and I don't want to press ctrl-c, I send the equivalent of ctrl-c with killall causing xsel to write /tmp/screen-exchange to the X clipboard, and then exit. It's a hack, but it works. If you know how to get this to work without a lame hack leave a comment explaining how.