Score:0

For each different folder how to make a different .iso?

cn flag

I have 12 folders

one
two
three
four
...

I wish to make something like this

one.iso
two.iso
...

but I don't know what command can I use. Any suggestion?

with Mkisofs you can use

mkisofs –o backup.iso /home/tin/Documents/backup

but this command is only for 1 folder: 1 iso file but I want 12 folders:12 iso files

pLumo avatar
in flag
Can't you use a loop? `for d in */; do mkisofs -o "$d.iso" "$d" ; done`
David avatar
cn flag
Why do you need to do this?
cn flag
@pLumo make it an answer :P you need the rep >:-D
Jack Rock avatar
cn flag
@pLumo I have this strange output, seems don't work, look here: https://imgur.com/XNXlGbB.png
pLumo avatar
in flag
pfffff @Rinzwind
Jack Rock avatar
cn flag
@pLumo I don't understand in what folders create that .iso because I go in folders and I don't see nothing, no .iso files
pLumo avatar
in flag
Ah my fault .wait!
Jack Rock avatar
cn flag
@pLumo mm...now I see... is inside my **zoom** folder and inside **zoom** folder but that .iso have no folder names ! Look here https://imgur.com/NzhoQEp.png
pLumo avatar
in flag
yes I know, I explain that in my answer.
Score:2
in flag

In the comments I told you to run:

for d in */; do
    mkisofs -o "$d.iso" "$d"
done

This created hidden files .iso in each of the directory, because inside the loop, $d contains a trailing slash, and evaluates to one/.iso instead of the expected one.iso.

So, please delete these files first:

rm */.iso

Now (and next time) you can do the right thing directly:

Go to the parent directory of your 12 directories and make a loop:

for d in */; do
    mkisofs -o "${d%/}.iso" "$d"
done

--> ${d%/} removes the trailing slash.

The iso files will be next to the directories named like

one.iso
two.iso
...
Jack Rock avatar
cn flag
Super! thank you !
pLumo avatar
in flag
Sorry for the confusion, glad to help :-)
us flag
@pLumo I think now you've cleared up the confusion, you can get rid of the top half of your answer and delete your first comment, otherwise you might make other people confused as well!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.