Results 1 to 3 of 3
I am writing a script that will allow me to gather logs and pull them together to be zipped, however, when I go to zip them, I want to be ...
- 08-30-2010 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 8
Zip file help
I am writing a script that will allow me to gather logs and pull them together to be zipped, however, when I go to zip them, I want to be able to have the script save the zip file as <machinename>.zip. How do I get the script to do this?
Please bear in mind that I ma new to scripting in Linux (I managed to piece this thing together pretty succesfully, but still need some wisdom).
Thanks ahead of time.
- 08-30-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 18
Hope this would help:
man zipIf the file list is specified as -@,
[Not on MacOS] zip takes the list of input files from standard input.
Under UNIX, this option can be used to powerful effect in conjunction with the find(1) command. For example, to archive all the C source files in the current
directory and its subdirectories:
find . -name "*.[ch]" -print | zip source -@
- 08-31-2010 #3
and the hostname is here:
Code:man hostname


Reply With Quote