12-22-2011
Or use zip -m
From man zip...
Quote:
-m
Move the specified files into the zip archive; actually, this deletes the target directories/files after making the specified zip archive. If a directory becomes empty after removal of the files, the directory is also removed. No deletions are done until zip has created the archive without error. This is useful for conserving disk space, but is potentially dangerous so it is recommended to use it in combination with -T to test the archive before removing all input files.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have the script.in this script comprees formatlike tar and insert to another directory and another sever.and how to write this process in script .
iam new for unix how to do this process.
please helpmea
naveen.g (1 Reply)
Discussion started by: naveeng.81
1 Replies
2. UNIX for Dummies Questions & Answers
I am trying to write a simple script where I tar a few files and send them to tape
The code looks like this:
tar -cvf archive/tam/*20080507* archive/sam/*20080507* source/delta/*20080507*
This runs fine from the command line but when i try to run this in a script I get an end of tape... (3 Replies)
Discussion started by: zapper222
3 Replies
3. UNIX for Advanced & Expert Users
Hi All
Can someone pls guide me if there any utility to compress file on windows & uncompress on vxworks
I tried as -
- compressed some folders on windows ... i created .tar ( to maintain directory structure ) and compressed to .gz format.
- on VxWorks i have uncompressed it to .tar... (1 Reply)
Discussion started by: uday_01
1 Replies
4. Shell Programming and Scripting
I am trying to implement the below command in my shell script
su - $PROCESS -c `tar -tvf $file|tee -a $LOG/$file.log`
The idea is to get the tar output on the screen and at the same time it should put the output in the log file.
Problem is:
1) I donot get the output on the screen.
2)... (3 Replies)
Discussion started by: kpatel786
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies
7. Shell Programming and Scripting
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies
8. Shell Programming and Scripting
The following script is supposed to look at a list of files and folders and tar them all up. Ofcourse you have to strip off everything to the left of the file or folder to tar only that object. My problem is that when I do that my script no longer knows how to find the file or folder. Is there a... (0 Replies)
Discussion started by: mj12net_brian
0 Replies
9. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
10. UNIX for Dummies Questions & Answers
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Discussion started by: vivien_chu
1 Replies
LEARN ABOUT PHP
zip_entry_open
ZIP_ENTRY_OPEN(3) 1 ZIP_ENTRY_OPEN(3)
zip_entry_open - Open a directory entry for reading
SYNOPSIS
bool zip_entry_open (resource $zip, resource $zip_entry, [string $mode])
DESCRIPTION
Opens a directory entry in a zip file for reading.
PARAMETERS
o $zip
- A valid resource handle returned by zip_open(3).
o $zip_entry
- A directory entry returned by zip_read(3).
o $mode
- Any of the modes specified in the documentation of fopen(3).
Note
Currently, $mode is ignored and is always "rb". This is due to the fact that zip support in PHP is read only access.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
Note
Unlike fopen(3) and other similar functions, the return value of zip_entry_open(3) only indicates the result of the operation and
is not needed for reading or closing the directory entry.
SEE ALSO
zip_entry_close(3), zip_entry_read(3).
PHP Documentation Group ZIP_ENTRY_OPEN(3)