This is a discussion on How to archive files along with folders using TAR? within the Shell scripting forums, part of the Development/Scripting category; Is that script right? DIRS="/home/folder1 /home/file1.php /home/file2.php" BACKUP=/tmp/backup.$$ FILE="fs-full-$NOW.tar.gz" tar -zcvf $BACKUP/$FILE $DIRS I have to type the /home for ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Is that script right?
DIRS="/home/folder1 /home/file1.php /home/file2.php" BACKUP=/tmp/backup.$$ FILE="fs-full-$NOW.tar.gz" tar -zcvf $BACKUP/$FILE $DIRS I have to type the /home for each file? Does it keep the folder structure when extracting? In my example it should be after extracted: /home/folder1 /home/file1.php /home/file2.php Thanks a lot. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to restructure folders recursively | kalt | Shell scripting | 2 | 10-26-2007 01:47 AM |
| Shell script for automatic conversion of files in tar files | kasimani | Shell scripting | 2 | 02-08-2007 04:45 PM |
| Public Folders In Scalix | zafar466 | Mail Servers | 0 | 02-08-2007 01:52 PM |
| auto deleting folders if empty | hinix | Shell scripting | 3 | 09-08-2005 06:02 PM |