Mp3 backup using find, mkisofs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mp3 backup using find, mkisofs
# 1  
Old 02-07-2010
Hammer & Screwdriver Mp3 backup using find, mkisofs

Hi. I want to create a Linux script to find all local mp3 files, create an ISO image. Later I will attempt to use growisofs
Something like this:
find ~ -name "*.mp3" | xargs mkisofs -o musicbackup
tried variations on this but no luck.
# 2  
Old 02-07-2010
mkisofs has a -find option.

So you should be able to accomplish your objective without the initial find command or xargs.

From the man page reference above:

Quote:
-find This option acts a separator. If it is used, all mkisofs
options must be to the left of the -find option. To the right of
the -find option, mkisofs accepts the find command line syntax
only.

The find expression acts as a filter between the source of file
names and the consumer, which is archiving engine. If the find
expression evaluated as TRUE, then the related file is selected
for processing, otherwise it is omited.

In order to make the evaluation of the find expression more con-
venient, mkisofs implements additional find primaries that have
side effects on the file meta data. Mkisofs implements the fol-
lowing additional find primaries:
# 3  
Old 02-07-2010
mkisofs in debian does not have such option.

Also, this command should work.
Code:
 find ~ -name "*.mp3" | xargs mkisofs -o musicbackup

Tested, it is working for me... What is the problem you have ?! how you say it is not working ?
# 4  
Old 02-07-2010
Bug Help is appreciated

On Ubuntu. Yes I'm struggling.
Code:
find ~ -name "*.mp3" | xargs mkisofs -o musicbackup

or similar find ~ -name "*.mp3" | xargs mkisofs -o musicbackup.iso
gives me output error:
Code:
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage: No such file or directory. Invalid node - '/home/lance/Music/Pat'.

I tried the mkisofs man pages way- by putting find on the right side but was getting another error about genisoimage no longer having the -i option.
# 5  
Old 02-08-2010
Error

Quote:
Originally Posted by lancest
On Ubuntu. Yes I'm struggling.
Code:
find ~ -name "*.mp3" | xargs mkisofs -o musicbackup

or similar find ~ -name "*.mp3" | xargs mkisofs -o musicbackup.iso
gives me output error:
Code:
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage: No such file or directory. Invalid node - '/home/lance/Music/Pat'.

I tried the mkisofs man pages way- by putting find on the right side but was getting another error about genisoimage no longer having the -i option.

Most likely, you have mp3 files which have single quotes in their file name, like

Code:
Silly/1986_-_Battalion_D'Amour/Silly_-_Battalion_D'Amour_-_01_-_Bataillion_D'amour.mp3

You can fix this by adding a correcting sed command into your pipe:

Code:
find . | sed -e "s/\'/\\\'/g" | xargs ls


Last edited by Andre_Merzky; 02-08-2010 at 05:05 AM.. Reason: typo
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Commando to find and move mp3 file and directory

Hello, I have a lot of mp3 in a various directory. My goal is a command that find all mp3 file and move the files and directory where is the mp3 file to a destination folder. Is it possible? Thanks in advance (7 Replies)
Discussion started by: giangi007
7 Replies

2. Shell Programming and Scripting

find mp3- and m4a-files

Hi, I will find all mp3 and m4a files on a certain volume with regular expressions. The following command will not work (I am new to this) find /Volumes/music/ -iname '*.m' Does anyone can help me with the right syntax? muetze PS Mac OS X (4 Replies)
Discussion started by: muetze
4 Replies

3. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

4. Shell Programming and Scripting

mkisofs to create iso

Hi all, I got the following problem. I run this command. mkisofs -o mynew.iso -l -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table base images isolinux pc_doc and I get all files from base, images, isolinux and pc_doc in the root dir of the iso. I want a... (2 Replies)
Discussion started by: stinkefisch
2 Replies

5. Solaris

How use the cdrw and mkisofs command...

Hi Guys. I am trying to tranfer the explorer output to a CD .... But I have serious doubt about use the cdrw and mkisofs command.. with the proupose of to make and tranfer the contents. Thank in Advance. AGADEA (5 Replies)
Discussion started by: aggadtech08
5 Replies

6. Programming

to find header in Mp3 file and retrieve data

hi all, In an mp3 file , data is arranged in sequence of header and data ,how to retrieve data between two headers. Is the data between two headers fixed? because as per theory it says 1152 samples will be there , but dont knw how many bits one sample correspond to? it would help if any c... (2 Replies)
Discussion started by: shashi
2 Replies

7. UNIX for Dummies Questions & Answers

Help with mkisofs

Hello, I am attempting to recreate an iso from a set of files. At this point I seem to be stuck on the creation process. I have reviewed man mkisofs, which returns genisofs. Below is the actual command, and what each piece of information seems to provide mike@presario:~$ sudo mkisofs -V... (2 Replies)
Discussion started by: mg92865
2 Replies

8. UNIX for Dummies Questions & Answers

What happened to mkisofs ?

I've been using a mkisofs line like this for years without problem # mkisofs -J -R -V 'Vol Label' -o /output/path/FILE.ISO /input/path/ Now, however, it gives a UTR-8 character message at the start INFO: UTF-8 character encoding detected by locale settings. Assuming UTF-8... (0 Replies)
Discussion started by: Bobby
0 Replies

9. Solaris

mkisofs and long file names

Well im using mkisofs to create iso images in Solaris 10 and then i use cdrw -i to burn the images to the cd the problem which i noticed recent ( im new to mkisofs) i noticed its break the long file names making them shorter i searched in its help and i find two parameters one -l and one... (2 Replies)
Discussion started by: XP_2600
2 Replies

10. UNIX for Advanced & Expert Users

ISO creation problem :-: mkisofs

Hi, I am trying to burn a directory containing some install scripts/executables etc onto a cd. I am using redhat v7.0. I have tried using mkisofs, but so far have not been able to get the case of the filenames to be correct. one file is called: startInstaller but it always comes out as... (1 Reply)
Discussion started by: ghoti
1 Replies
Login or Register to Ask a Question