Tag Archives: file

archive and synchronizations with unison and rsync

I use [rsync](http://www.samba.org/ftp/rsync/rsync.html) 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](http://ubuntuforums.org/showthread.php?t=451684)). I recently discovered [unison](http://www.cis.upenn.edu/~bcpierce/unison/), and am [using](http://blog.nguyenvq.com/2011/07/18/real-time-file-synchronization-like-dropbox-via-unison/) 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

[Dropbox](https://www.dropbox.com/referrals/NTkxMTE4MDk) 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](http://lifehacker.com/5813861/dropbox-accidentally-unlocked-all-accounts-for-4-hours) and [privacy](http://gizmodo.com/5817885/dropboxs-new-tcs-pushes-users-into-a-panic-over-privacy-and-ownership) concerns, leading to calls for read more »

Watch a folder or file with inotify-tools

I recently needed to watch a folder for a file. I stumbled on [this](http://www.webupd8.org/2010/11/script-to-watch-folder-and-upload-new.html) post and discovered [inotify-tools](https://github.com/rvoicilas/inotify-tools/wiki/). 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

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](http://superuser.com/questions/31135/split-mpeg-video-from-command-line) and [this](http://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-split-mpg-files-using-a-ffmpeg-command-542607/), which suggests: However, for some reason my out file is almost as large as my in file, even though I’m read more »

Find files and find files containing certain text

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](http://content.hccfl.edu/pollock/unix/findcmd.htm): To find files with `bar` in it’s content using the command [grep](http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/):

GPG/PGP: sign or encrypt emails or files

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](https://help.ubuntu.com/community/GnuPrivacyGuardHowto) instructions read more »