Results 1 to 3 of 3
I have folder called .temp in
Code:
/backups/full/user/.temp
I have the script which puts database backups and home directory backup(.tar.gz) in that .temp folder.
Now from those two backups i ...
- 08-06-2009 #1Just Joined!
- Join Date
- Aug 2009
- Posts
- 15
how to create tar file without folders
I have folder called .temp in
I have the script which puts database backups and home directory backup(.tar.gz) in that .temp folder.Code:/backups/full/user/.temp
Now from those two backups i want to create a third full.tar file which will contain those two backups.
The problem is if i use
then when i extract my archive , then i have the following directory structureCode:tar -cf full.tar /backups/full/user/.temp/*
I got all the folder above like
Is there any way that my tar file only contain files in .temp and not all the folders.Code:folder bakcups -->full -->user-->.temp and then the backups
- 08-06-2009 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Try this:
Code:tar -C /backups/full/user/.temp -cf full.tar .
- 08-07-2009 #3Just Joined!
- Join Date
- Aug 2009
- Posts
- 15
Actually i was using coomand
the problem is su removes the first slash and wants to find relative path bit i want to use absolute path.su -c "tar -C /backups/full/user/.temp -cf full.tar ." - username
Is there any solutions for this


Reply With Quote