archive and synchronizations with unison and rsync

Posted by & filed under Linux.

I use rsync as my primary backup utility as it is fairly efficient at archiving files (NOTE: to backup to fat32 usb drives, make sure –modify-window=1 is used). I recently discovered unison, and am using it for real time synchronization between directories from two Linux computers. I really like it. Because of how well unison… Read more »

Real time file synchronization like Dropbox via Unison

Posted by & filed under Linux, Security.

Dropbox is a very nice tool for real time synchronization. It works very well to keep files from multiple devices (computers, phones, etc.) in sync. I use it mainly as a cloud-based backup for some of my files. However, it’s been on the headlines recently due to security and privacy concerns, leading to calls for… Read more »

Watch a folder or file with inotify-tools

Posted by & filed under Linux.

I recently needed to watch a folder for a file. I stumbled on this post and discovered inotify-tools. Using it, I can write a bash script to watch a folder for files, and do things when certain events happen. The “watch” script can be launched at startup by adding its execution in /etc/rc.local.

Split, cut, or sample a video file on the command line

Posted by & filed under Linux.

There are many reasons to cut or split a video file. For example, one may want to cut a long video into multiple parts to upload to YouTube. I first ran into this and this, which suggests: ffmpeg -ss 00:00:00 -t 00:01:00 -vcodec copy -acodec copy -i in.avi out.avi ## -ss: start position ## -t:… Read more »

Find files and find files containing certain text

Posted by & filed under Linux.

This is a reminder to myself as I keep forgetting how to do these basic searches in Linux. To find files with file name containing the text foo using the command find: ## find file with “foo” in file name find ./ -name *foo* ## replace ./ with path; can use shell style wildcards ##… Read more »

GPG/PGP: sign or encrypt emails or files

Posted by & filed under Linux.

I always wanted to set this up, but never got around to it because I a particular need never arised. I finally had some time to set up my GPG key so others can send me encrypted files and emails. Google “gpg” or “pgp” for more information about it. Setup I followed these instructions to… Read more »