Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I am trying to use the TAR command to archive a subset of files within a directory (and all its subdirectories).
I am interested in all files ending in .csv.
I think the way to do this is to combine the TAR and the FIND command e.g. find . -name *.csv
will list all file from the current direcotry downwards which end in .csv.
However when I try and pipe this into the tar command e.g.
find . -name *.csv | tar -cvf test.tar
the command does not work.
Any ideas on how to get this working?
I may be on the wrong path with the FIND command.
Thanks!!
I am trying to use the TAR command to archive a subset of files within a directory (and all its subdirectories).
I am interested in all files ending in .csv.
I think the way to do this is to combine the TAR and the FIND command e.g. find . -name *.csv
will list all file from the current direcotry downwards which end in .csv.
However when I try and pipe this into the tar command e.g.
find . -name *.csv | tar -cvf test.tar
the command does not work.
Any ideas on how to get this working?
I may be on the wrong path with the FIND command.
Thanks!!