Linux/Quickies
From Sukimashita
This page should provide a list of small but powerful mini-guides to certain tools that can efficiently increase your productiviy.
[edit] hexdump: format strings explained
As the manual of hexdump seems a bit hard to understand I wonder why they didn't include such an example:
$ hexdump -e ' [iterations]/[byte_count] "[format string]" '
As you might guess, this means apply format string to groups of byte_count bytes, iterations times. Format string is like printf.
You can of course chain multiple formats together, or put them in a file. So say you needed to clag some binary data into a C array, a-la firmware for loading into a driver. You could use
$ hexdump -v -e '6/4 "0x%08x, "' -e '"\n"' ./dump
to get something that fits in 80 columns and is almost ready to go.
[edit] sshfs: mount remote filesystem using ssh and fuse
NOTE: If you use GNOME, simple use the "Connect to Server..." > "SSH" functionality.
sshfs is a simple client tool which enables you to easily mount remote filesystems over ssh into your local system.
- Make sure to have FUSE running and create a mountpoint
su modprobe fuse mkdir /media/sshfs chown root:users /media/sshfs chmod g+w /media/sshfs
- Mount remote system
sshfs [<username>@]<hostname>:[<remotepath>] <localmountpath> ... sshfs parishilton@hilton.com:~/pictures/naked /media/sshfs
- Enjoy accessing the remote filesystem transparently
ls /media/sshfs ...
- Unmount
fusermount -u /media/sshfs
The cool thing is that you can do this over the internet and for instance stream a movie file while even being able to seek in it!