Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zipping up recently modified files 1

Status
Not open for further replies.

nogs

Technical User
Aug 3, 2001
89
GB
Can any one help me?
I have identified all files in a dir created today;
find . -atime -1 -print
What I would now like to do is zip all the files up
 
Zip them together or independantly?
Ie lots of .gz's or one big phat .gz file ***************************************
Party on, dudes!
 
Karver[surprise]
One big fat gzip file would be suffice, ie;
if files were modified today then gzip them all together in a file called avirus.zip (or some thing like that!!)

Thanks for your help in advance
Nogs[afro]
 
1) make sure you have gtar on your system
(cd /
find . -name gtar)
Shove all relevent files into a folder and do the following:

/path/to/gtar -zcvf avirus.tgz todaysfilesfolder

to undo it at the other end
/path/to/gtar -zxvf avirus.tgz

gtar is a single file so just cpoy it to any other machines and make it executable.
[cannon]

***************************************
Party on, dudes!
 
This script might be useful
for gzipping your files.

Findit
Main Menu
--------------------------------------------------------------------------------
1) Find files by name
2) Find files by size
3) Find files by user
4) Find files by age
5) Find files by access date
6) Find files by file permissions
7) Custom Search (mix & match criteria)
8) Find files by text within file

Enter choice OR press [ENTER] to repeat menu
Enter [x] to exit
--> 1

Please enter file name to search for
* can be used as a wild card ex: *.log
enter * alone to search for all files
note: all searches are case sensative

File Name--> *
Search Path--> /usr/local/bin/scripts
Include sub-directories in this search? (y/n) [y]
Follow symbolic links? (y/n) [n]

Executing: find /usr/local/bin/scripts/* -name * -print
Searching...
real 0.10
user 0.01
sys 0.02

.Search Complete!
82 matches found.

note: detailed results will take more time
by running an ls -ld command against each match.
Provide detailed results? (y/n) [n]


Basic results saved in: /tmp/TMP_LIST.18193.Results

Display results on screen? (y/n) [y] n


Please press [RETURN] to continue



Avanced Tools Menu
--------------------------------------------------------------------------------
1) [Display] files found on screen
2) [Search] for text within files found
3) Calculate [Sum] of file [sizes]
4) [Compress] all/some files with [gzip]
5) Add all/some files to an [archive] with [tar]
6) [Delete] all/some files
7) Perform [new search]


You can download findit from
Robert Robert G. Jordan

Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.
[lightsaber]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top