Sponsored Content
Top Forums Shell Programming and Scripting Archive Files over certain modification time Post 302351063 by dr.house on Monday 7th of September 2009 03:24:59 AM
Old 09-07-2009
Draft (untested):

Code:
#! /bin/bash

find /cygdrive/d/data/ -mtime +182 -type f >> files.lst

cat files.lst | \
while read SOURCE
do
  TARGET=$( echo $SOURCE | sed 's/d\/data/e\/Archive/' - )
  FOLDER=$( basedir $SOURCE )
  if [ ! -d $FOLDER ]
  then
    mkdir -p $FOLDER
  fi
  mv $SOURCE $TARGET
done

exit 0

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File modification time

Does anyone know how to display the time with seconds of when a file was last modified. I can get hour & minutes but would also like seconds. --Running AIX (1 Reply)
Discussion started by: edog
1 Replies

2. Shell Programming and Scripting

Displaying the Last Modification Time of a specific file

How can I get and display the last modification time of a file? in scripting or specifically using Batch file I want this info for me to determine whether an image has been edited or not by using the last modification time and compare it to our stored date of modification. can somebody help... (5 Replies)
Discussion started by: jaque18
5 Replies

3. Shell Programming and Scripting

ls -e to find out File modification time in secs

Hi All, I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10 -rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP Is there... (3 Replies)
Discussion started by: rahulkav
3 Replies

4. Shell Programming and Scripting

time modification in script

Hi All.. I have a file with a number of non-unique entries as below: 1243 01:42:29,567 --> 01:42:32,108 blah blah .... blah blah .. 1244 01:42:32,709 --> 01:42:34,921 blah blah .... 1245 01:42:35,214 --> 01:42:36,533 blah blah .... blah blah .. blah blah .... blah blah .. (4 Replies)
Discussion started by: UniRock
4 Replies

5. Shell Programming and Scripting

File modification time comparison

Hi All, I have two files (given below) each exists under different paths. I want to compare the modification time stamp of file1.txt is lessthan the modification time of file2.txt. month1=`ls -l file1.txt | awk '{ print $6}'` date1=`ls -file1.txt | awk '{ print $7}'` time1=`ls... (1 Reply)
Discussion started by: Arunprasad
1 Replies

6. UNIX for Dummies Questions & Answers

Need Modification Time of a file

Hi all, I need the modification time of a file on a particular day say 3 days before. I just don't want the last modification time. I need all the modification times on a particualar day. Is there anyway to do it? Kindly help. Could anyone tell me where the modification time is stored?... (1 Reply)
Discussion started by: vidhyab
1 Replies

7. Shell Programming and Scripting

How to list the files based on the modification time using the find command?

Hi All, I need to list the files based modification time of the files from a directory, I cannot use "ls -t" as there are lot of files, which "ls" command cannot handle. New files will land there daily. So iam looking for an alternative through "find"command. All suggestions are welcomed. ... (6 Replies)
Discussion started by: Kesavan
6 Replies

8. Shell Programming and Scripting

Ls ignoring files from their modification time

Hi everyone, I'd like to know if is there a way to list files but ignoring some according to their modification time (or creation, access time, etc.) with the command 'ls' alone. I know the option -I exist, but it seems to only looking in the file name.. Thank you in advance for the... (8 Replies)
Discussion started by: Keyhaku
8 Replies

9. Shell Programming and Scripting

How to change modification time of file?

Explain it with proper e.g (4 Replies)
Discussion started by: sidpatil
4 Replies

10. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies
XDELTA3(1)						      General Commands Manual							XDELTA3(1)

NAME
xdelta3 - VCDIFF (RFC 3284) binary diff tool SYNOPSIS
xdelta3 [command] [options] [input [output]] DESCRIPTION
xdelta3 is a binary diff tool that uses the VCDIFF (RFC 3284) format and compression. COMMANDS
config prints xdelta3 configuration decode decompress the input, also set by -d encode compress the input, also set by -e (default) test run the builtin tests printdelta print information about the entire delta printhdr print information about the first window printhdrs print information about all windows recode encode with new application/secondary settings OPTIONS
standard options: -0 .. -9 compression level -c use stdout -d decompress -e compress -f force overwrite -F force the external-compression subprocess -h show help -q be quiet -v be verbose (max 2) -V show version memory options: -B bytes source window size -W bytes input window size -P size compression duplicates window -I size instruction buffer size (0 = unlimited) compression options: -s source source file to copy from (if any) -S [djw|fgk] enable/disable secondary compression -N disable small string-matching compression -D disable external decompression (encode/decode) -R disable external recompression (decode) -n disable checksum (encode/decode) -C soft config (encode, undocumented) -A [apphead] disable/provide application header (encode) -J disable output (check/compute only) -T use alternate code table (test) -m arguments for "merge" NOTES
The XDELTA environment variable may contain extra args: XDELTA="-s source-x.y.tar.gz" tar --use-compress-program=xdelta3 -cf target-x.z.tar.gz.vcdiff target-x.y/ EXAMPLES
Compress the differences between SOURCE and TARGET, yielding OUT, using "djw" secondary compression: xdelta3 -S djw -s SOURCE TARGET OUT Do the same, using standard input and output: xdelta3 -S djw -s SOURCE < TARGET > OUT To decompress OUT, using SOURCE, yielding TARGET: xdelta3 -d -s SOURCE OUT TARGET AUTHOR
xdelta3 was written by Josh MacDonald <josh.macdonald@gmail.com>. This manual page was written by Leo 'costela' Antunes <costela@debian.org> for the Debian project (but may be used by others). Xdelta3 August 2013 XDELTA3(1)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy