Autorun, Not really a bad guy

When ever someone finds an autorun.inf file in their flash drives, they would immediately try to hit delete, thinking it is a virus. It most probably is, except in some situations.

Autorun.inf is a file that is used to give some attributes to a disc/disk. For example an icon for your cd, or for your pen drive even. You could also assign some parameters to determine what program should be launched when the disc is loaded. Stuff like that.

Something interesting you could do with your pen drives is, to give it a fancy icon. All you have to do is create a file called Autorun.inf using a text editor and enter something like

[autorun]
icon=.\someicon.ico

Save the file in the root folder of the disc/disk and then add your image file as well in the same place (or some other place, depending on the path you set for the icon parameter). You are done.

Another common parameter is open=myapplication.exe

For more info, refer the manual. Or take a look at this blog, it was pretty good. I just wanted to let you know that it is not always a virus, you have some good uses too. Just that its vulnerability is used pretty well by the virus manufacturing folk 🙂

Advertisements

Compress, Split and Join Tar files – Linux

Creating a tar file and splitting it for storing it in cds, dvds or any other storage with small capacity.

Create a tarball and compress it using bz2 or gz compression algorithms by using one of the following commands.

tar -cvjf tarofsomefolder.tar.bz2 /home/someone/Documents/*
tar -cvzf tarfileofsomeiso.tar.gz some.iso

To split you can use the split command
split -b 4500M tarofsomefolder.tar.bz2 "tarofsomefolder.tar.bz2.part"

You can use both of them together in a single command by piping the outputs of the tar command to the split command,

tar -cvzf downloads.tar.bz2 ~/Downloads/* | split -b 4500M - "downloads-part"

To extract these split tar files together, you have to cat those individual tar files either by listing them one after the other or by using a regular expression that covers all of it and then piping the output to a tar extract command. Something like,

cat downloads.tar.bz2.part* | tar -xvzf -

Mount a disk – Linux – cmd

To mount a disk (usually a file system that you usually go and click on using nautilus/caja (file browsers)) from the command line, use the following,

udisksctl mount -b /dev/disk/by-label/

Listing the content of /dev/disk/by-label/ will give you the names of the mountable disks/drives. Usually flash drives are mounted automatically so they do not have to be mounted. Unless you unmount it and want to mount it again. Use man udisksctl for more information. Also, I think it is udisks in some distributions.

Wget – Download from a list

If everyone started to read the manual then bloggers like me would…. eh no… I would still blog even if no one reads this.

This is pretty simple but it is really nice and may inspire you to investigate more. If you have a list of links to download all you have to do is put them all in a text file. One in each line. Then fire up wget from the terminal like this

wget -i path/to/textfile

 

This will download all of those files one by one and save it in the present working directory. Really good if you already have a list of links to download. Or if you have a set of links to download from on  the same page you can use some download plug in like downthemall on firefox.

You can use wget to do a lot lot more. Read the manual. You can use wget on bash scripts as well, since it is a command line tool. Imagine the possibilities. You could write a bash script with regex to get all files with certain patterns from a particular location. I once downloaded a full website containing more than a 1000 html pages with wget, and it was really good. But that was simple. Not much scripting involved though. You just have to look for the proper parameters to use with wget.

Get rid of the FAT(32)

Here is one good reason why you can stop using FAT32 file format for your drives.

The Story: I have been using computers since around 2000. I started out with windows 98 first of all and I have grown up using FAT32 for a very long time. When NTFS came in, right about when windows NT came in i guess? I am not sure, I never bothered to know what it was about and I continued using FAT32 on all my data drives till now. Although my C drive may have been in the new NTFS format, I was still using FAT32 for the other drives without realizing what I was doing. Then I switched to Linux where it was ext4. So for a lot of years NTFS and FAT32 did not bother me.

The Crux: Calamity struck now after so many years. I was trying to download an 8GB zip file containing a database and the downloads kept stopping at 4GB. A little investigation, and I came to know that the maximum file size in a FAT32 drive is only 4GB. Gladly, my trust wget command line downloader gave me a perfect error to search for. The only way out of this was to have an NTFS or ext4 drive. Maybe I would just go for ext 4. I dont see myself adding/installing windows anytime in the future on my laptop.

A good job for tomorrow. Backup everything on an external hard drive, format my hard disk, put it all back again.


Thu Oct 5 14:10:16 IST 2017: Related update here

Opera, All the way

I recently made a switch from Chrome/Firefox to Opera along with another change. You can read about the other change here. But ever since I made the switch I have been in love with it and I have been trying it out on my phone as well. It was really nice. It was slick. I then installed it on a really old tablet that gives you a lesson on patience, no matter what you try to do with it, especially if you want to browse with chrome on it. Installed Opera mini, the light version of the browser on it, and it worked really well. That was the turning point and I was hooked! Well impressed, when I got my a new tablet for myself I stopped using Chrome altogether, now opera is my default, through out, across all devices. Linux and Android. Its been around a month or so and I have not faced anything bad so far. The lack of plug-ins did not worry me much. I needed some and I found those and they work well. So I am all set.

Reaper on Linux, Wine – Blog – Part 1/2

Yesterday I was just going through the Reaper website and I noticed something really interesting. I was so happy to see it.

windows - wine

Seems reaper works well through wine. I have always thought of how the Reaper guys never ported it to Linux. Since Reaper feels so much like Linux, in philosophy and working.

So I did it. I installed Reaper on Fedora through Wine.

reaper-wine-linux

It runs reaaally well!. Super slick!. I love it. I haven’t done anything on it though. No recordings or projects yet. Will do it sometime in a few days. I will get back to you on how everything went. Hopefully it is not disappointing. 🙂