Sponsored Content
Top Forums Shell Programming and Scripting How to tar, compress and remove files older than two days Post 302309505 by edr on Wednesday 22nd of April 2009 04:55:38 AM
Old 04-22-2009
Question

Hi.

Thanks a lot for helping me.
There is one thing I do not understand.
I 've four wav files with a different date.

-rw-r----- 1 dtuser staff 258904 Apr 22 09:53 3210223758_73072441618_20090415151440972.wav
-rw-r----- 1 dtuser staff 192504 Apr 21 09:53 3210224056_73073919768_20090418102231949.wav
-rw-r----- 1 dtuser staff 258904 Apr 20 09:53 3210223758_73072441618_20090415151440972.wav
-rw-r----- 1 dtuser staff 192504 Apr 19 09:53 3210224056_73073919768_20090418102231949.wav

Using the recommended commands in my test scrip have no making any sense.

find ${MAIN_DIR} -name *.wav -mtime -3 > FILE_LIST
or
find ${MAIN_DIR} -name \*.wav -mtime -3 -exec mv {} \;

-mtime -3 or -mtime -5 or -mtime -10 makes no difference.
The result is that all files are compressed and removed instaed of the files of three days old.

Best regards.
Eddy.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar files older than 30 days

Hi there, I am trying to tar a number of files held in a specific folder. I am only interested in archiving files older than 30 days. Having read through the man entries and all available documentation I thought I'd cracked the coomand with tar -c -z -v -N 15/04/2004 -f /wfch.tar * This... (6 Replies)
Discussion started by: wfch
6 Replies

2. UNIX for Dummies Questions & Answers

Find files older than 5 days and remove tem after listing

need help with this ... Find files older than 5 days and remove tem after listing list "test" file older than 5 days and then remove them (1 Reply)
Discussion started by: ypatel6871
1 Replies

3. Shell Programming and Scripting

Need to remove files older than 30 days except directories

Hi, I need to remove files (*.trc) which are older than 30 days from one location. My problem is there I do not want to visit any of the directories at that location. I want to search files at that particular location only (need to skip directorys at that location). maxdepth option is there... (6 Replies)
Discussion started by: malaymaru
6 Replies

4. Solaris

Find files older than x days and create a consolidated single tar file.

Hello, I need help in finding files older than x days and creating a single consolidated tar file combining them. Can anyone please provide me a script? Thanks, Dawn (3 Replies)
Discussion started by: Dawn Bosch
3 Replies

5. Shell Programming and Scripting

Need script to tar files older than 30 days

Hi all. Here's my situation: I have performance reports that run every 30 minutes saved in the format: stats_report_11251000.txt stats_report_11251030.txt stats_report_11251100.txt stats_report_11251130.txt (Obviously run at Nov 25 10 AM, 10:30 AM, 11 AM and so on...) I would... (2 Replies)
Discussion started by: jamie_collins
2 Replies

6. Shell Programming and Scripting

script to remove files older than 60 days

Hi I need help in the script which looks at a contorl file which has a list of file names like xxxx.12345 and I want to take only xxxxx and search in a specific directory and remove the file if its older than 60 days I have written something like this.. but seems to be wrong... (1 Reply)
Discussion started by: antointoronto
1 Replies

7. Shell Programming and Scripting

Remove files older than 2 days.

Hi All, I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file. # Remove old explorer runs if needed DIR=`dirname ${EXP_TARGET}` if ... (2 Replies)
Discussion started by: Navkreddy
2 Replies

8. UNIX for Dummies Questions & Answers

How to compress the directories which is older than 7 days?

Hi all, how to compress the directories which is older 7 days. If any one knows please help me this is urgent. Thanks in advance (3 Replies)
Discussion started by: rameshpagadala
3 Replies

9. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

10. Shell Programming and Scripting

Compress folders older than x days

hello everyone. in /opt/abc every night there is a new folder created. in that folder there is aseries of files created for that day. i would like to run a script every Sunday night at 02:00 to compress each file separately (preserving its name) who is older than 2 days. i have found this... (2 Replies)
Discussion started by: atux
2 Replies
sid2wav(1)							   User Commands							sid2wav(1)

NAME
sid2wav - output wav files out of sid files SYNOPSIS
sid2wav [-commands] <datafile>|- [outputfile] DESCRIPTION
Sid2wav is a synthetic waveform generator from sid files, named after the Sound Interface Chip found in Commodore 64 personal computers. With this tool, one can 'convert' sid files to wav ones that popular music players like XMMS can play. Note that you don't have to convert sid files just to listen them, sidplay can play it for you just as it would sound on a real C64. Also, XMMS has an input plugin to play sid files directly. The use is that you may convert sid tunes to wav and later to any compressed format like Ogg or MP3 for users lacking sid- play. Other use would be to convert files to wav for audio CD creation. COMMANDS
-h gives help on usage. -f<num> set frequency in Hz (default: 44100). -16 16-bit (default: 8-bit) -s stereo (default: mono). -ss enable stereo surround. -u au output (8000Hz mono 8-bit u-law). -o<num> set song number (default: preset). -a improve PlaySID compatibility (not recommended). -a2 transparent ROM memory mode (overrides -a). -n enable NTSC-clock speed for VBI tunes (not recommended). -nf no SID filter emulation. -ns MOS 8580 waveforms (default: MOS 6581). -m<num> mute voices out of 1,2,3,4 (default: none). Example: -m13 (voices 1 and 3 off). -t<num> set seconds to play (default: 60). -b<num> skip first <num> seconds into the song (default: 0). -fin<num> fade-in time in seconds (default: 0). -fout<num> fade-out time in seconds (default: 2). SEE ALSO
sidplay(1), xmms (1). AUTHORS
Michael Schwendt <sidplay@geocities.com> Adam Lorentzon <d93-alo@nada.kth.se> This manpage was written for the Debian GNU/Linux system by Laszlo 'GCS' Boszormenyi <gcs@lsc.hu> (but may be used by others). Sidplay May, 2004 sid2wav(1)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy