Licence
Creative Commons License

This work by Stephane KATTOOR is licensed under a Creative Commons Attribution 3.0 Unported License.
Feeling like tipping ?
If you find this blog useful, you might consider sending a few bitcoins to support it : 1BTtsC3beGJ6ysd8DhrXjdo6jVw5WD9mvY
RSS
 
RSS Feed
Follow me !
Tech@Sakana on Facebook
Search this site

Newsletter

Get latest posts by email (No spam, only posts):

Enter your email address:

Delivered by FeedBurner

Categories
Monthly archives
May 2013
M T W T F S S
« May    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Unix 101 : Showing non-printing characters in text files (ex : DOS files) - January 7, 2011 by Stephane Kattoor

A non-printing character is a character which won’t actually get directly printed (or displayed) but rather interpreted. Such non-printing characters are for example line-feed or tabulation. The interpretation of those characters can differ from one system to the next. For example the line-feed character is different on Unix or DOS.

If you need an easy way to confirm that a text file is DOS or UNIX formatted (they differ with respect to the end of line character(s) for example) or if you wish to display normally non-printing characters of a text file, you can use the -vET command line switches of the cat utility.

As explained in the man page :

  • -v : will use the ^ and M- notation for control and multibytes characters
  • -E : will make ends of lines visible
  • -T : will make tabulations visible

For example : read this entry »

Linux : Using loop devices (eg : mounting an ISO file) - January 13, 2008 by Stephane Kattoor

If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso
spaghetti% sudo mount /dev/loop0 /mnt
spaghetti% ls /mnt
Autorun.inf setup.exe setup.ico
spaghetti%
[...]
spaghetti% sudo umount /mnt
spaghetti% sudo losetup -d /dev/loop0

This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.

You can of course mount an ISO using loop devices, but there is more to it. You could for example mount a ciphered file containing an EXT2 filesystem.

Check out the man page for more details.

Who am I ?
Ads