tar archiving with base name only [slightly OT] - shell
This is a discussion on tar archiving with base name only [slightly OT] - shell ; Hi, Going through the lengthy list of tar options, I cannot find one that allows the creation of an archive using only the base name of files. Say we're creating an archive like: tar -cvvzf tararch.tgz file1 subdir/file2 ~/file3 The ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Going through the lengthy list of tar options, I cannot find one that allows the creation of an archive using only the base name of files. Say we're creating an archive like: tar -cvvzf tararch.tgz file1 subdir/file2 ~/file3 The archive will have the same directory structure. Any advice on creating an archive containing only base names of the files? Thanks. Cheers, -- Seb |
|
#2
| |||
| |||
|
Seb > Hi, > > Going through the lengthy list of tar options, I cannot find one that > allows the creation of an archive using only the base name of files. > Say we're creating an archive like: > > tar -cvvzf tararch.tgz file1 subdir/file2 ~/file3 > > The archive will have the same directory structure. Any advice on > creating an archive containing only base names of the files? Thanks. Just the obvious. 1. Copy the diretory 2. remove the extensions 3. make an archive Or 1. Restore the directory 2. remove the extensions |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 05:43 PM.




Linear Mode