dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

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 ...


Home > Database Forum > Operating Systems > shell > tar archiving with base name only [slightly OT]

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 11-08-2008, 08:31 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default tar archiving with base name only [slightly OT]

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.


Cheers,

--
Seb
Reply With Quote
  #2  
Old 11-12-2008, 06:08 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: tar archiving with base name only [slightly OT]

Seb writes:

> 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
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 05:43 PM.