May 27, 2009 -
I finally gave Dropbox a try and it’s awesome !
Dropbox makes syncing files across computers a breeze (Linux, Mac OS X, Windows).
I recommend you check their screencast here to get a better idea of what it does.
By default, you get 2 GB with the free account.
If you are interested in testing it, please use the link below for subscribing :
https://www.getdropbox.com/referrals/NTEyMTA5NTc5
For any new user referred by me, both you and I will get an extra 250 MB on our accounts.
December 7, 2008 -
Lately I installed rsnapshot on my lappy to get my files backed up on my home server during the night, in case the laptop is on.
Rsnapshot is only CLI, I still somewhat wanted to get some kind of visual notification saying the backup was starting (and ending).. just to avoid shutting down my machine while the backup process was still on, for example.
Rsnapshot allows you, throught the cmd_postexec and cmd_preexec options, to run scripts before and after the backup job.
I came up with scripts using Zenity for visual notifications.
The thing is, the cmd_postexec script must complete before the backup can begin, and the only documented way I found to start the backup was to click OK on the zenity notification. This would be annoying if I’m not at the computer at that time (which is very likely
). The notification popup would just wait for my input to start the backup job.. not good.
I tried to figure out a decent way to get rid of the popup after a few second, but I didn’t have to search for too long.. Indeed, Marco spotted that Zenity has an undocumented timeout option doing exactly what I wanted.
Odd that it is not documented..
Thanks to Marco !
For the curious, here’s the cmd_postexec script (rsnapshot running as root and opening the popup on the user’s desktop) :
#!/bin/bash
su USERNAME -c 'export DISPLAY=:0.0; zenity --timeout 30 --info --text "Rsnapshot backup will start in 30 seconds"'
exit 0
-
If you want to batch rename files under Linux, check out PrefixSuffix.
I’m usually all for the CLI, but this nifty tool is quite convenient (if you have a GUI available
)
It is available right in the Ubuntu repositories, but not under Debian’s.
http://prefixsuffix.sourceforge.net/
(for the CLI addicts, feel free to post oneliners doing the same job (and even more))
November 16, 2008 -
I heavily rely on the following tools to manage my music.
I must be using Easytag on a daily basis really. This is definitely the best tool to manage hundreds of MP3’s. If you are like me and like to see your music properly sorted in your player, this is definitely the tool you need.
Sound Converter has been able to convert every file I submitted to it. Essential !
Easytag :
EasyTAG is an utility for viewing, editing and writing
the ID3 tags of different audio files, using a GTK+ interface.
Currently EasyTAG supports the following:
– View, edit, write tags of MP3, MP2 files (ID3 tag), FLAC files (FLAC Vorbis
tag), Ogg Vorbis files (Ogg Vorbis tag), and MusePack, Monkey’s Audio files
(APE tag),
– Auto tagging: parse filename and directory to complete automatically the
fields (using masks),
– Ability to rename files from the tag (using masks) or by loading
a text file,
– Process selected files of the selected directory,
– Ability to browse subdirectories,
– Recursion for tagging, removing, renaming, saving…,
– Can set a field (artist, title,…) to all other selected files,
– CDDB support (from http protocol),
– Etc…
Debian package name : easytag
id3tool
A command line ID3 tag editor
A simple and complete editor for ID3 tags in MP3 files. ID3 tags are a way of identifying mp3 music files – you can store Artist, Album, Title, Track, Year, and Genre in a tag, as well as a 28-character comment.
Debian package name : id3tool
Gnome Sound Converter :
SoundConverter is a simple sound converter application for the GNOME
environment. It reads sound files in any format supported by GStreamer
and outputs them in Ogg Vorbis, FLAC, or WAV format, or MP3 format if
you have the GStreamer LAME plugin.
Debian package name : soundconverter
Now blame me for not using Ogg
October 29, 2008 -
NAME
pv - monitor the progress of data through a pipe
SYNOPSIS
pv [OPTION] [FILE]...
pv [-h|-V]
DESCRIPTION
pv allows a user to see the progress of data through a pipeline, by
giving information such as time elapsed, percentage completed (with
progress bar), current throughput rate, total data transferred, and
ETA.
...
Some examples :
pv file | nc -w 1 somewhere.com 3000
cat file | pv -s 12345 | nc -w 1 somewhere.com 3000
Installation :
Under Debian :
apt-get install pv
September 29, 2008 -
Under Debian :
apt-get install fdupes
Then :
fdupes -r /home/user > /home/user/duplicate.txt
-r : recursive
Output of the command goes in duplicate.txt
fdupes will compare the size and MD5 hash of the files to find duplicates
July 23, 2008 -
stow : Stow, a software installation management utility for Linux that offers a number of advantages over the tried-and-true Red Hat and Debian package management systems. With Stow, you can organize applications available in standard tar files and keep application binaries logically arranged for easy access.
http://www.ibm.com/developerworks/linux/library/l-stow/
Official homepage : http://www.gnu.org/software/stow/stow.html
iperf : Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.
http://sourceforge.net/projects/iperf
rsnapshot : rsnapshot is a filesystem snapshot utility for making backups of local and remote systems.
Using rsync and hard links, it is possible to keep multiple, full backups instantly available. The disk space required is just a little more than the space of one full backup, plus incrementals.
http://www.rsnapshot.org/
January 5, 2008 -
Today, I had to recover some data from a (badly) failed drive.
The drive was coming from a laptop. I first tried to recover stuff using the Ubuntu Live CD on the laptop, but it didn’t work. Whenever I was trying to install the necessary tools in the Live CD environment, the system was hanging and throwing IO errors from the failed drive.
I attached the drive (using a 2″1/2 to 3″1/2 adapter) to my desktop machine and booted under Ubuntu.
It was impossible to mount the drive directly (returning IO errors immediately).
dd was not able to copy the content of the drive, because of the bad sectors.
The tool dd_rescue (from the package ddrescue) came to help.. It found errors at around 2.8 GB and 13 GB but kept going. I’m now in possession of a file that can be mounted and I can recover the precious files.
Usage : dd_rescue -l errors.log /dev/sdc1 /path/to/destination/diskdump
Here’s the description of ddrescue : copies data from one file or block device to another
dd_rescue is a tool to help you to save data from crashed partition.
It tries to read and if it fails, it will go on with the next sectors
where tools like dd will fail. If the copying process is interrupted
by the user it is possible to continue at any position later.
It can copy backwards.
gddrescue, dcfldd and rdd are apparently similar tools. I haven’t tested them.
Searching for the word “forensic” in Synaptic returned some interesting tools.
foremost : Forensics application to recover data
This is a console program to recover files based on their headers and
footers for forensics purposes.
Foremost can work on disk image files, such as those generated by dd,
Safeback, Encase, etc, or directly on a drive. The headers and footers
are specified by a configuration file, so you can pick and choose which
headers you want to look for.
Usage : foremost -t jpg -i diskdump
This would recover jpg files from diskdump and copy the recovered files in the current directory
vinetto : A forensics tool to examine Thumbs.db files
A tool intended for forensics examinations. It is a console program to extract
thumbnail images and their metadata from those thumbs.db files generated under
Windows. Used in forensic environments.
Usage : vinetto Thumbs.db -o /tmp/dir
This would recover the cached preview images from Thumbs.db into /tmp/dir
sleuthkit : Tools for forensics analysis
The Sleuth Kit (previously known as TASK) is a collection of UNIX-based
command line file system and media management forensic analysis tools.
The file system tools allow you to examine file systems of a suspect
computer in a non-intrusive fashion. Because the tools do not rely on
the operating system to process the file systems, deleted and hidden
content is shown.
You can use “autopsy” as front-end to sleuthkit.
gdmap : Tool to visualize diskspace
GdMap is a tool which allows to visualize disk space. Ever wondered why your
hard disk is full or what directory and files take up most of the space? With
GdMap these questions can be answered quickly. To display directory
structures cushion treemaps are used which visualize a complete folder or even
the whole hard drive with one picture.
The purpose here was to recover files from a failed drive.. not doing forensics, so only dd_rescue was really needed today.
I’ll try to keep a list of useful recovery/forensics tools in this post.
If you have suggestions about tools, technique, etc. drop me a line.
October 19, 2006 -
iptstate provides live iptables monitoring
iptstates shows all iptables activity in a top-style display:
IPTables – State Top
Version: 1.3 Sort: SrcIP s to change sorting
Source Destination Proto State TTL
192.168.1.1,3834 193.40.133.134,123 udp 0:00:28
192.168.1.1,3822 216.58.31.84,123 udp 0:02:53
192.168.1.1,3828 216.52.237.153,123 udp 0:02:47
192.168.1.10,43496 192.168.1.26,22 tcp ESTABLISHED 119:59:59
192.168.1.11,57252 71.87.212.168,8080 tcp ESTABLISHED 29:43:53
192.168.1.25,57505 209.40.99.8,80 tcp ESTABLISHED 3:48:32
iptstate has a number of useful commands, such as setting the refresh interval, sorting by different columns values, resolving domain names, and a number of interactive commands to use while it’s running. Read the fine man page to learn them all.
http://www.phildev.net/iptstate/
-
watch – execute a program periodically, showing output fullscreen
DESCRIPTION
watch runs command repeatedly, displaying its output (the first
screenfull). This allows you to watch the program output change over
time. By default, the program is run every 2 seconds; use -n or
–interval to specify a different interval.
The -d or –differences flag will highlight the differences between
successive updates. The –cumulative option makes highlighting
“sticky”, presenting a running display of all positions that have ever
changed. The -t or –no-title option turns off the header showing the
interval, command, and current time at the top of the display, as well
as the following blank line.
watch will run until interrupted.
watch comes with the package “procps” under CentOS
It can be useful in debugging/testing stuff/…
Next Page »