Help - Search - Members - Calendar
Full Version: Linux And Free Software Tips, Tricks And Tutorials
Hamara Forums > General > Computing and Technology
hildebrand
I am starting this thread with a long term perspective to put together lots of useful information for our programs.
Request all to participate in this thread to spread the word about all the lovely things that can be done on Linux.

The distribution I use is Debian (from www.debian.org) but most tricks shall be generic in nature (program based). Many of the softwares are available on windows also so some tips maybe applicable for their windows versions also.
hildebrand
Tip #1: Converting bitrate of mp3 files

I sometimes have the requirement to convert high bitrate files to lower bitrate ones so that they are of smaller sizes on websites.
I normally use the lame mp3 encoder for this purpose (also available on windows).

Suppose you have a file abc.mp3 (of say 128 kbp s although its immaterial) to be converted to def.mp3 of bitrate 16 kbps then command for it is:-

lame -b 16 abc.mp3 def.mp3

Its possible to write a script to convert many files as a batch.

Note that 16 is just a number. you can convert to other standard values also although in general converting to higher values is not suggested.
The permitted values are as follows:-

For MPEG1 (sampling frequencies of 32, 44.1 and 48 kHz)
n = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320

For MPEG2 (sampling frequencies of 16, 22.05 and 24 kHz)
n = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160


It is also possible to change the sampling rate also with the following switch:-

-s sfreq
sfreq = 8/11.025/12/16/22.05/24/32/44.1/48

hildebrand
Tip #2 : Zipping files

It is possible to zip a file very simply with the zip command.

zip zipfilename.zip file1 file2 ....

I once had a requirement to convert bitrate (as in Tip #1) and zip as well for which I have a readymade one. it converts all mp3 files in a folder and zips them too.
hildebrand
Tip #3: Making list of mp3 files in a folder

There is a perl program called mp3report available for the purpose. (windows version is also there).

Its syntax is: mp3report <directorypath>

It shall make an html file for you with report of file with other track details!
This is the one I use to get track length, bitrate details.

An example snapshot is attached.

Note that it recursively shows all mp3 files (also supports the capitalised .MP3) so you could actually have your whole collection in a single html file. Makes easy to search songs then.
Exon
QUOTE(hildebrand @ Sep 20 2009, 02:21 AM) *

Tip #3: Making list of mp3 files in a folder

There is a perl program called mp3report available for the purpose. (windows version is also there).

Its syntax is: mp3report <directorypath>

It shall make an html file for you with report of file with other track details!
This is the one I use to get track length, bitrate details.

An example snapshot is attached.

HB,

This is very informative. i am sure I will find lots of helpful hints from you.

My 'mp3report' (ver 1.0.2) doesn't give audio details such as KHz, bitrate etc.

Here is another mp3 output utility. This could be useful to some of us who prefer text outputs.

MP3info:
Output:

File: Oot Patang - 1955 - Thumak Thumak Chali Gori - Geeta Dutt & Sudha Malhotra - DN Madhok - Vinod.mp3
Title: thumak thumak chali gori Track:
Artist: Geeta Dutt, Sudha Malhotra
Album: Oot Patang Year: 1955
Comment: Source: Rushin; HF Genre: Ethnic [48]

File: Punjabi-Duniya de malika teri duniya ajeeb hai-HemantK-SulakshanaP-3_20-160.mp3
Title: punjabi Track:
Artist: Hemant Kumar Sulakshna Pandit
Album: Duniya de malika teri duniya Year:
Comment: mahesh kumar sharma Genre: Other [12]

File: RajaHarischandra-1952-prabhu na bisaariyo ji-MRafi-LataM-chorus-3_37-128.mp3
Title: prabhu na bisaariye ji, hari n Track:
Artist: Mohammad Rafi, Lata Mangeshkar
Album: Raja Harischandra Year: 1952
Comment: Source: Kadri420 Genre: Ethnic [48]

File: Rangeeli-1952-saiyan_agar_tum_ho-ShamshadB-3_11-192.mp3
Title: saiyan agar tum ho sher Track:
Artist: Shamshad Begum
Album: Rageeli Year: 1952
Comment: Source: G. Nabee; Mirsa Genre: Ethnic [48]

File: RimJhim-1949-Na tum aaye na neend-ShamshadB.mp3
Title: na tum aaye na neend aayi, tum Track:
Artist: Shamshad Begum
Album: Rim Jhim Year: 1949
Comment: Source: Khawar Sohail Genre: Ethnic [48]

File: Sanam-1951-Mein Kehdoon Tumko Chor-Suraiya-MRafi-cleaned-2_39-192.mp3
Title: main kehadoon tumko chor Track:
Artist: Suraiya, Mohammad Rafi
Album: Sanam Year: 1951
Comment: Source: Kistin; cleaned Genre: Ethnic [48]

File: Shaheed-1948-badnaam_na_hojaaye-SurinderKaur-FilmVer-3_57-128.mp3
Title: badnaam na hojaaye mohabbat ka Track:
Artist: Surinder Kaur
Album: Shaheed Year: 1948
Comment: net video-rip Genre: Ethnic [48]

File: ShivShakti-1952-naina_more--toot_gay_daali-GeetaD-3_20-128.mp3
Title: naina more bhaye baawre ..., t Track: 4
Artist: Geeta Dutt
Album: Shiv Shakti Year: 1952
Comment: Source: Erum Hashmi Genre: Ethnic [48]

File: ShriGaneshJanam-1951-gajaananam--jai_ganesh_jai_ganesh-MannaD-SulochanaK-chorus-3_24-160.mp3
Title: gajaananam ..., jai ganesh jai Track:
Artist: Manna Dey, Sulochana Kadam, ch
Album: Shri Ganesh Janam Year: 1951
Comment: Source: Jayaraman Genre: Ethnic [48]


Exon

hildebrand
Exon
I also use the same version of mp3report. I have modified the default template to give additional details.

HF is not allowing me to put the code here at the moment.
I am attaching the template I use. This one also shows the track name and artist names! I can add more fields but don't like the entries to become too big.

To use the template instead of the default one, the command is:-

mp3report --template=/your-location/template.html <directory-to-make-list-of>

you could have a different filename of course.
hildebrand
Tip #4: mp3info
As mentioned by Exon, mp3info is also a very useful software. It can even be used for tag editing!


If you just want track details syntaxi is simply: mp3info <filename.mp3>

e.g.

CODE

mp3info Dil\ thandi\ hawa\ mein\ uda\ jaye_Shamshad\ \ Hamida.mp3
File: Dil thandi hawa mein uda jaye_Shamshad  Hamida.mp3
Title:   Dil Thandi Hawa Mein Uda Jaaye Track: 1
Artist:  Shamshad Begum, Hamida Bano
Album:   Shama                          Year:  1946
Comment: Ghulam Haider, Ehsan Rizvi     Genre: Oldies [11]

When used to find the technical attributes, syntax is:

mp3info -x <filename.mp3>

This gives the track details and the technical information.

e.g.
CODE

mp3info -x Dil\ thandi\ hawa\ mein\ uda\ jaye_Shamshad\ \ Hamida.mp3
File: Dil thandi hawa mein uda jaye_Shamshad  Hamida.mp3
Title:   Dil Thandi Hawa Mein Uda Jaaye Track: 1
Artist:  Shamshad Begum, Hamida Bano
Album:   Shama                          Year:  1946
Comment: Ghulam Haider, Ehsan Rizvi     Genre: Oldies [11]
Media Type:  MPEG 1.0 Layer III
Audio:       128 kbps, 44 kHz (stereo)
Emphasis:    none
CRC:         No
Copyright:   No
Original:    Yes
Padding:     Yes
Length:      2:56


The manpage of the software is available here:
http://www.ibiblio.org/mp3info/mp3info.html
Exon
QUOTE(hildebrand @ Sep 20 2009, 03:30 PM) *

Exon
I also use the same version of mp3report. I have modified the default template to give additional details.

HF is not allowing me to put the code here at the moment.
I am attaching the template I use. This one also shows the track name and artist names! I can add more fields but don't like the entries to become too big.

To use the template instead of the default one, the command is:-

mp3report --template=/your-location/template.html <directory-to-make-list-of>

you could have a different filename of course.

HB,

Thanks for the script; I will try it.

Here is another good one, eyeD3

AplamChaplam-1961-subah_hoti_hai_shaam_hoti_hai-LataM-6_39-128.mp3 [ 6.10 MB ]
--------------------------------------------------------------------------------
Time: 6:39 MPEG1, Layer III [ 128 kb/s @ 44100 Hz - Joint stereo ]
--------------------------------------------------------------------------------
ID3 v2.3:
title: subah hoti hai, shaam hoti hai artist: Lata Mangeshkar
album: Aplam Chaplam year: 1961
track: genre: Ethnic (id 48)
Comment: [Description: ] [Lang: ]
Source: Sani Thakur


Is there a way to get a report of V2 tag details?

Exon



hildebrand
Tip #6 : file
This is a very handy default utility with which you can find the type of any file.

Syntax: file <filename>

examples of usage:

CODE

file sawankenazare_shamshadbegum.mp3
sawankenazare_shamshadbegum.mp3: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, Stereo


CODE

file khazanchi.png
khazanchi.png: PNG image, 983 x 482, 8-bit/color RGB, non-interlaced


CODE

file mysqltry.c
mysqltry.c: UTF-8 Unicode C program text


CODE

file 0750647167.pdf
0750647167.pdf: PDF document, version 1.4


This utility is particularly useful if by mistake you got a file with no extension or an incorrect one.
hildebrand
Tip #7: extract utility (which uses libextractor)

Similar to the well-known "file" command, extract can display meta-data from a
file and print the results to stdout.
.
Currently, libextractor supports the following formats: HTML, PDF, PS, OLE2
(DOC, XLS, PPT), OpenOffice (sxw), StarOffice (sdw), DVI, MAN, MP3 (ID3v1 and
ID3v2), OGG, WAV, EXIV2, JPEG, GIF, PNG, TIFF, DEB, RPM, TAR(.GZ), ZIP, ELF,
REAL, RIFF (AVI), MPEG, QT and ASF.
.
Also, various additional MIME types are detected. It can also be used to
compute hash functions (SHA-1, MD5, ripemd160).
Homepage: http://www.gnunet.org/libextractor/

Its syntax is extract -f <filename>

Admittedly, it works tag2 although with no extra details (auto-generated from the tag) which it seems to give with version 1.

The below output shows details for a file with both v1 and v2 tags (which are identical)

CODE

extract -f comment diwaliphiraagayi_shamshad.mp3
duration - 2m26
format - MPEG-1 Layer III audio, 128 kbps (CBR), 44100 Hz, stereo, no copyright, original
resource-type - MPEG-1
mimetype - audio/mpeg
description - Shamshad: Diwali Phir Aa Gayi (Khazanchi)
track number - 1
comment - MD- Ghulam Haider
genre - Oldies
year - 1941
album - Khazanchi
artist - Shamshad
title - Diwali Phir Aa Gayi
content type - (11)
filesize - 2.34 MB
filename - diwaliphiraagayi_shamshad.mp3


Following is output with a file with tag of v2 only which shows everything but the extra stuff disappears (probably not coded for). In general though, I feel its a good practice to keep both tags.
CODE

extract -f diwaliphiraagayi_shamshad.mp3
year - 1941
album - Khazanchi
artist - Shamshad
title - Diwali Phir Aa Gayi
mimetype - audio/mpeg
filesize - 2.34 MB
filename - diwaliphiraagayi_shamshad.mp3
hildebrand
Tip #8 - Software for editing mp3 tags : kid3-qt

This software provides a very useful tagging facility. Both v1 and v2 tags can be put. You can easily select any file in a directory (good for bulk tagging). You can put just one of the tags (usually I put v2 and the other one can just be got by the click of a button).
It has built in genres which is easy to select. Its possible to add extra tags in v2 very easily too.

A snapshot showing the software and options is attached.
hildebrand
Tip #9: Screen Capture Software
Often for presentations we have a requirement to store a video of desktop to demonstrate features of software.

recordmydesktop is a good lightweight utility to record the desktop. It is available on all GNU/Linux Box

Syntax for using it is simple:-

$recordmydesktop output.ogv

There is another software called xvidcap too but is more crash prone articularly for full size video.

after recording you can resize it to desired size using
CODE

$vlc -I dummy out.ogv vlc:quit --sout "#transcode{ vcodec = theo, width = 512, height = 384 }:duplicate{ dst = std{ access = file, mux=ogg, dst = \"out_512x384.ogv\" }}" --sout-theora-quality=3


PS: approximate size of file was 4MB per minute.

There is a graphical frontend gtk-recordmydesktop also available. Some other softwares like istanbul, captury are also available.

You can also use Shutter from http://shutter-project.org/ which is much more feature rich than some other softwares for the same job.
hildebrand
Tip #10: Zipping and unzipping many files in a folder

Whenever you need to upload many mp3 files its painful zipping each one of them. Usually I put all of them in a single folder and use a custom script to zip all the mp3 files in that folder.

The script I use is as follows:-

QUOTE

for FILE in *.mp3; do
OUTFILE="${FILE%%.mp3}.zip"
echo $OUTFILE, "$FILE"
zip "$OUTFILE" "$FILE"
done
exit 0


If you want to use the same script, just copy the code to a file (say, makezip.sh), make it executable (using chmod +x makezip.sh) and copy it to your /usr/bin folder. From then on it can be run by you in any folder you want.

Sometimes I have the reverse requirement. I downloaded say 10 files and its boring to unzip all. So I use the reverse script makeunzip as follows:-

QUOTE

for FILE in *.zip ; do
unzip "$FILE"
done
exit 0


Linux users shall know that zip is a good ethical format to use. Unfortunately, many users upload rar files (which is a non-free standard). So to unrar I use the following script:-

QUOTE

for FILE in *.rar ; do
unrar x "$FILE"
done
exit 0


For ethical reasons I don't rar. For the unaware, I am reproducing a post on another website on why I one should not use rar.

QUOTE

Quite a large amount of data has been made available on peer-to-peer networks within the last few years. A lot of people see this a sign of a broader change in relationship between content authors and recipients. Many talk about revolution. Some of that data on these networks, specifically complete music albums, full discographies and movie subtitles, is compressed using the RAR archiver, most often with no real reason. In this document, I want to try to explain why I believe that this method should be avoided in order to make the digital revolution happen faster, less problematically and in a just and non-discriminatory fashion.

Before we make our point, let us tell you that it is really useless to compress audio data which is probably encoded into MP3 or Ogg Vorbis and thus already heavily compressed, leaving very little if any room for additional shrinking using the RAR archiver. For example, full discography of the legendary UK Subs occupies 1037 megabytes of hard disk space as a directory of MP3 files or 1025 megabytes as a single compressed archvive file. The difference is negligible both in terms of disk storage space and connection bandwidth. Off course, you still may want to put all the audio files into one large file, in order to facilitate sharing of the data over a peer-to-peer network. For this purpose, there is available a utility called Tar (see google), which is way faster, smaller and simpler than the RAR archiver. It doesn't perform any compression, just sticks the files together.

Why you should care? Does it matter if you waste only a few seconds of CPU time for useless compression? Maybe it doesn't, but there's another issue; a much more important one. It's that the RAR archives, or at least the vast majority of them, cannot be decompressed with free software. Free software is such software whose license enables it to be run for any purpose, to be studied and analyzed, modified and redistributed with or without modifications and with or without a distribution fee. The growing social movement which has gradually developed around this kind of software within the past twenty years and which has brought to the public such works as the GNU/Linux and BSD operating systems, the Apache web server, the Mozilla Firefox web browser or the OpenOffice.org suite, is generally believed to be an indispensable part of the digital media revolution. Many members of that movement believe that in order to take their case seriously, they have to refuse to use any non-free software.

Unfortunately, there is no free software RAR decompressor that could handle the vast majority of RAR archives currently shared on the network. The official RAR decompressor is freeware and its source code is available, but it still doesn't make it free software at all, as the license still heavily restricts the users' rights and freedoms. There is another RAR decompressor which is available under the free software movement's flagship GPL license. Unfortunately again, that program can only handle archives generated by RAR 2.x and as far as RAR 3.x archives - today de facto standard on peer-to-peer networks - are concerned, only their contents can be listed but no actual data can be extracted. This may never change, since RAR 3.x includes patented algorhitms and it would require a pretty smart programmer to reverse-engineer the format without violating the patents.

In conlusion, it's not possible to decompress modern RAR archives with free software. Therefore, please don't publish or share such archives, since it is discriminatory against members of the free software movement. This movement is part of the same revolution as the peer-to-peer networks are, so we believe that the two communities should cooperate and tolerate each other's ideals. If you need to stick many short files together, use Tar, and if you really need to compress them (or if you don't like Tar for some reason), please use the traditional Zip format which is easily readble by free software decompressors as well. You will contribute to development of better society. Thank you very much.





hildebrand
Please note that windows users can also use the zip utility.

You can use UnxUtils available for download from unxutils.sourceforge.net/

Extract the contents of http://unxutils.sourceforge.net/UnxUtils.zip to a folder of your choice. Add the local/bin directory to your default path.

After that in shell you shall be able to use zip and other commands!

hildebrand
Tip #11: Making multibyte zip of big files

Sometime there is a requirement to make many part zip of big files. I used p7zip for it. (available on multiple platforms).

The syntax is:-

CODE

to encode
7z a -v*M/k file.zip file
to decode
7z e file.zip01

hildebrand
Tip #12: Typing Tutor

KLavaro is a lovely typing tutor software for those looking for one. It has lots of good features. it has lots of exercises and grades well too. Tests check for wpm, accuracy and fluidity as well.

hildebrand
Tip #13: How to type in Hindi in Open Office and other softwares?

I normally use KDE. will mention the procedure for that incase
someone's interested:-
1. Open Control Center. Go to Regional & Accessibility->Keyboard Layout.
2. Click on Enable Keyboards radio button.
3. Select India on left panel (Available layouts) and click on add.
This will cause a new India layout to come in active layouts on the
right.
4. In the layout variants you can choose 'deva' (if you want standard
hindi keyboard) or 'bolnagri' (if you want phonetic hindi keyboard,
which I prefer since its easy).

Once this is done the KDE Keyboard Layout tool shall be available in
your system tray. Whenever you need to type in Hindi select the
appropriate hindi layout. Once thats done you can type in Hindi in all
softwares supporting hindi unicode including Open Office. If you want
hindi fonts ttf-devanagri package should be installed.

Its possible to do similarly in GNOME also where you have a switcher
applet which you can add to your desktop.
Add -> Utility -> Keyboard layout switcher (for Gnome <2.6). For newer
gnome use 'keyboard indicator'.

Please note that instead of hindi layout you could have gone for other layouts like tamil, telugu, punjabi, oriya, bengali etc also to type in those languages.
hildebrand
Tip #14: Installing Winamp using wine on Linux
Follow the following steps:-
1. Install wine using your favourite package management software
2. Download Winamp Version 5.541 from www.oldapps.com (Newer winamp does not work) (or direct link: http://www.brothersoft.com/winamp-download-227621.html )
3. Right click on the executable and open with wine
OR
Run ' wine </yourpath>winamp5541_full_bundle_emusic-7plus_en-us.exe'
4. During the installation process do not select the "Winamp Agent" or "Modern skins" under User Interface Extensions (it makes winamp very slow and unstable otherwise)

Your installation is done and you can run by clicking the icon on your desktop. Alternatively run:
wine '/home/yourusername/.wine/drive_c/Program\ Files/Winamp/winamp.exe'

In case you need to be a DJ for shoutcast radio on HF or other stations you can also install the usual dsp plugin over wine. (This is what I use for my shoutcasts).
The plugin is available here:-
http://www.shoutcast.com/download (Direct link: http://yp.shoutcast.com/downloads/shoutcas...9-0-windows.exe )

Follow the procedure to become DJ given here:-
http://www.hamaraforums.com/index.php?showtopic=16324#
Exon
HB,

Will installing Wine in a Linux machine increase its vulnerability to viruses?

Exon
hildebrand
Tip #15: Installing Goldwave on Linux using wine

Goldwave is one of the best audio editing tools available. I was missing using it on linux earlier. Not anymore. Follow this procedure to get it for you too:-

1. Download Goldwave 4.26 (Newer one doesn't work due to DirectX not being supported by wine yet) from here: http://www.oldapps.com/goldwave.php
2. Install the executable using wine.
3. Get mfc42.dll from any XP Installation and copy it to /home/yourusername/.wine/drive_c/windows/system32/ (needed for program to work). You can also download it from here: http://www.dll-files.com/dllindex/dll-files.shtml?mfc42

Your program is ready to be used. All audio editing works seamlessly like on windows. I have never tried CD ripping (for obvious reasons, there are foss tools available) and don't know if that will work.
hildebrand
QUOTE(Exon @ Nov 12 2009, 10:09 PM) *

HB,

Will installing Wine in a Linux machine increase its vulnerability to viruses?

Exon


No Exon. Windows viruses don't affect linux even when you use wine. The wine programs can always be removed in case of any problem.
hildebrand
Tip #16: How to recover files deleted by rm -r

http://osscamp.in/blog/how-recover-deleted...-command-ext3fs
hildebrand
Tip #17 - Stapler for pdf

Often one has lots of pdf's and one wishes it was possible to have an "software" stapler with which one could add delete pages at will and do other things with it.

pdftk is what you've been looking for.

To quote from the manual:-

If PDF is electronic paper, then pdftk is an electronic stapler-remover,
hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a
simple tool for doing everyday things with PDF documents. Keep one in the
top drawer of your desktop and use it to:
- Merge PDF documents
- Split PDF pages into a new document
- Decrypt input as necessary (password required)
- Encrypt output as desired
- Fill PDF Forms with FDF Data and/or Flatten Forms
- Apply a Background Watermark
- Report PDF on metrics, including metadata and bookmarks
- Update PDF Metadata
- Attach Files to PDF Pages or the PDF Document
- Unpack PDF Attachments
- Burst a PDF document into single pages
- Uncompress and re-compress page streams
- Repair corrupted PDF (where possible)

That gives an idea about what all the software can do.

What more can one ask of a software which is just a little over 3 MB in installed size!

Here are some examples on how to use the lovely software:-

Decrypt a PDF
pdftk secured.pdf input_pw foopass output unsecured.pdf

Encrypt a PDF using 128-bit strength (the default), withhold all permissions (the default)
pdftk 1.pdf output 1.128.pdf owner_pw foopass

Same as above, except password ’baz’ must also be used to open output PDF
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz

Same as above, except printing is allowed (once the PDF is open)
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz allow printing

Join in1.pdf and in2.pdf into a new PDF, out1.pdf
pdftk in1.pdf in2.pdf cat output out1.pdf
or (using handles):
pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf
or (using wildcards):
pdftk *.pdf cat output combined.pdf

Remove ’page 13’ from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

Apply 40-bit encryption to output, revoking all permissions (the default). Set the owner PW to ’foopass’.
pdftk 1.pdf 2.pdf cat output 3.pdf encrypt_40bit owner_pw foopass

Join two files, one of which requires the password ’foopass’. The output is not encrypted.
pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output 3.pdf

Uncompress PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)
pdftk doc.pdf output doc.unc.pdf uncompress

Uncompress PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)
pdftk doc.pdf output doc.unc.pdf uncompress

Repair a PDF’s corrupted XREF table and stream lengths, if possible
pdftk broken.pdf output fixed.pdf

Burst a single PDF document into pages and dump its data to doc_data.txt
pdftk in.pdf burst

Burst a single PDF document into encrypted pages. Allow low-quality printing
pdftk in.pdf burst owner_pw foopass allow DegradedPrinting

Write a report on PDF document metadata and bookmarks to report.txt
pdftk in.pdf dump_data output report.txt

Rotate the first PDF page to 90 degrees clockwise
pdftk in.pdf cat 1E 2-end output out.pdf

Rotate an entire PDF document to 180 degrees
pdftk in.pdf cat 1-endS output out.pdf
hildebrand
A nice list of mistakes done by new users of linux is available at the following link:-

http://www.zdnet.com/blog/btl/10-mistakes-...bies-make/34444
hildebrand
Tip #18: Partitioning a pen drive with label name

As root for a pen drive with device name /dev/sdb1 (ensure not mounted) give the following command:-

mkfs.vfat /dev/sdb1 -n <labelname>

For sudo based systems like Ubuntu don't forget to put sudo before mkfs.vfat.



hildebrand
Tip #19: Using mp3info to get the information from mp3 files in desirable format

This software had been pointed out by Exon in this thread earlier. I have made a script to show it in the format I want it. (Default one doesn't give the bitrate and time duration information. The order is not intuitive as well.)

This is the script I made:-

mymp3info.sh
mp3info -r a -p "File:%f \nTitle: %t\nArtist: %a\nAlbum: %l\nYear: %y \nBitrate: %.2r\nDuration: %02m:%02s\n" "$1"

This script gives output as shown for a file below:-

mymp3info.sh 01\ TERE\ NI\ KARARAN\ -\ INH100614651.mp3
File:01 TERE NI KARARAN - INH100614651.mp3
Title: Tere Ni Kanaran Mainu Pateya
Artist: Lal Chand Yamla Jatt
Album: Khedan De Din Chaar - LCYJ
Year:
Bitrate: 128.00
Duration: 06:38



This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.