10 More Discussions You Might Find Interesting
1. HP-UX
Hello,
I will like to execute a find, tar & gzip in one command.
find * -type f -mtime -$nb_days -print | xargs tar -cvf $MAITUT/BCK_DATA.tar
gzip $MAITUT/BCK_DATA.tar.gz
The fact that the TAR is very big, at the end I need to generate only a compress file.
Please note... (22 Replies)
Discussion started by: royinfo.alain
22 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I need to combined in 1 line the execution below :
find * -type f -mtime -$nb_days -print | xargs tar -cvf $MAITUT/BCK_DATA.tar
gzip $MAITUT/BCK_DATA.tar.gz
The fact that the TAR is very big, at the end I need to generate only the GZ file.
The option z on the tar... (2 Replies)
Discussion started by: royinfo.alain
2 Replies
3. UNIX for Dummies Questions & Answers
Hello!
I have a question about how to combine patterns in grep commands with the OR operator.
So I have this little assignment here:
Provide a regular expression that matches email addresses for San Jose City College faculty. A San Jose City college faculty’s email address takes the form:... (1 Reply)
Discussion started by: kalpcalp
1 Replies
4. Shell Programming and Scripting
Hello,
I am trying to write a housekeeping that finds all .trc files older than x days in a given FS, checks if they are used and gzips them if they are not used by any process. I need to do it without calling any additional .sh script.
I managed to make it work for Linux only:
find .... (4 Replies)
Discussion started by: Valkov
4 Replies
5. UNIX for Dummies Questions & Answers
Hello
I am trying to select multiple files older than 14 days and create a single compressed file out of it. (AIX Release 3 Version 5)
I am trying to achieve it by following
tar -cvf db01_log.tar `find . -name "db01*.log" -mtime +14" -print`| gzip > db01_log.tar
however it just... (7 Replies)
Discussion started by: Chetanz
7 Replies
6. Shell Programming and Scripting
I am having an issue adding the -size test to my find command.
I am trying to find all files smaller than 250mb, that are not in .snapsnot or man directories.
What i started with
find . -xdev -type d \( -name man -o -name .snapshot \) -prune -o -type f
What I have tried..unsuccessfully... (4 Replies)
Discussion started by: nitrobass24
4 Replies
7. UNIX for Advanced & Expert Users
Hi all,
what i'm trying to configure its to the following,
find all files older then 1 min,gzip them ,rename/move with date and extension .gz (example tes.log_2012-07-26.gz) and trying to move them to another folder (gzipped),the command i'm typing its this,
find /home/charli/Desktop/test/ -type... (4 Replies)
Discussion started by: charli1
4 Replies
8. Shell Programming and Scripting
Hi - can someone please help me combine find, grep and possibly ls into something workable:
i.e. How can I list all the files that contain the word "pet" in all directories under the current directory that are called "animal", bar those anywhere under directories called "archive"?
I suspect... (6 Replies)
Discussion started by: cs03dmj
6 Replies
9. UNIX for Dummies Questions & Answers
Started using unix commands recently.
I have 50 gzip files. I want to grep each of these files for a line count based particular category in column 3. How can I do that?
For example
Sr.No Date City Description Code Address
1 06/09 NY living here 0909 10st st nyc
2 ... (5 Replies)
Discussion started by: jinxx
5 Replies
10. UNIX for Advanced & Expert Users
Hello,
I am wondering if you can assist with my question and ask kindly for this.
I have a number of files that are listed as file1.gz through file100.gz.
I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Discussion started by: legharb
3 Replies