08-23-2010
how to tar with date criteria?
I would like to tar (compress) all the files with some date criteria.
I tried :
tar -cvwf 20_08_2010.tar | ls -la | grep "Aug 20"
but it's not working. How should I type?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there a way to know when (date, time) a tar archive on tape was created? (1 Reply)
Discussion started by: croy75
1 Replies
2. Shell Programming and Scripting
hye everybody :) ,
i'm new to the scripting world.. hope you guys can help me out with this one..
i'm trying to identify any directory under /tmp/saya that is created more than one day from the current date..
e.g, today is March 14, so any directory that has time stamp March 13 backwards, i... (2 Replies)
Discussion started by: fara_aris
2 Replies
3. 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
4. Shell Programming and Scripting
Hi,
I have a solaris 10, I would like to tar log files by date, or by range of hours into one tar file.
All I coud do is by name (very simple...:cool:). (4 Replies)
Discussion started by: pointer
4 Replies
5. 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
6. Shell Programming and Scripting
hi,
I have multiple files created per date every day. I want to be able to tar all the files older than 7 days into a single file and then gzip that tarred file and move it to a separate partition. Then delete the actual files.
Eg - "ls -l" shows Dec 8 has 6-8 files created. I want to tar... (4 Replies)
Discussion started by: vishal7
4 Replies
7. Shell Programming and Scripting
Hi all,
Following is my small script:-
#!/bin/ksh
for i in `cat /users/jack/mainfile-dr.txt`
do
sudo cp -r $i /users/jack/DR01/.
done
cd /users/jack/DR01/
sudo tar cvf system1-DR.tar *
scp system1-DR.tar backupserver:/DRFiles/system1
sudo rm -rf system1-DR.tar
In this script I... (10 Replies)
Discussion started by: manalisharmabe
10 Replies
8. Red Hat
I need to find out only Jun 10 created and modified file with tar command ,, I am using Linux red hat x86_64 GNU/Linux.
ls -lrt
-rw-r--r-- 1 nova nova 2757 Jun 7 11:00 feed.ctl
-rwxrwxr-x 1 nova nova 457 Jun 7 11:00 acc_feed.csh
-rwxr-xr-x 1 nova nova 473 Jun 7 12:11... (2 Replies)
Discussion started by: balajikalai
2 Replies
9. Shell Programming and Scripting
Hi,
I would like to ask if there is a way to search for a file inside a .tar.gz file without extracting it? If there is, is there a way to search for that file by date?
Thanks! (4 Replies)
Discussion started by: erin00
4 Replies
10. Shell Programming and Scripting
Hi,
I am trying to Zip a folder inside a shell script like below. It successfully taring but it only returns Null inside the variables. Searched a lot but no clue to finding the root cause.
testno=1;
date=20171128;
DIR=/root/ sh -c 'cd $DIR; tar cvf "AWS.${testno.${date}.tar" "./AWS"'
... (5 Replies)
Discussion started by: pradyumnajpn10
5 Replies