You are not logged in.

#1 2008-03-11 19:42:30

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

simple tar question

When creating a tar in xarchiver, you can select the option: "do not add file paths".

Say you are tarring /mnt/storage/music/rock with such an option, when you extract it into your home folder, it will create a folder called 'rock' with its contents inside. If you don't select the option, the full path will be included and the a 'mnt' folder will be created in the home folder.

How do I enable this option on the command line? I can't seem to work it out from the man page.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#2 2008-03-11 20:33:18

danielsoft
Member
From: Czech Republic
Registered: 2008-02-16
Posts: 102

Re: simple tar question

simply cd to "/mnt/storage/music" and tar the "rock" directory : is that sufficient?


may the Source be with you

Offline

#3 2008-03-11 22:44:42

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: simple tar question

Hmm i just was hoping there was a different way to do that. It would make my script that i'm trying to write a lot simpler sad


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#4 2008-03-11 23:09:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: simple tar question

Read man tar and/or tar --help. There are a lot of options e.g. danielsoft's suggestion can be handled in one entry with the -C flag.

Offline

Board footer

Powered by FluxBB