Sponsored Content
Full Discussion: file date vs. system date
Top Forums UNIX for Dummies Questions & Answers file date vs. system date Post 6731 by clemeot on Tuesday 11th of September 2001 02:13:51 AM
Old 09-11-2001
Power confusing about -ctime

I "man find" but do not understand.
May I know when we will use -ctime instead of -mtime?

and why must put a ";" at last? I found if i just enter this command, it will also work:

find /at/path/dir -mtime +3
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare date from db2 table to yesterday's Unix system date

I am currently running the following Korn shell script which works fine: #!/usr/bin/ksh count=`db2 -x "select count(*) from schema.tablename"` echo "count" I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Discussion started by: sasaliasim
9 Replies

2. Shell Programming and Scripting

Set system date to some date (Sunos)

I am testing a script and need to change the system date to Nov 30 2009. I cannot seem to find a way to do this other than TZ command but it does not seem to work correctly. I tried TZ=GMT+168 date but it is returning todays date Mon Dec 7 19:48:11 GMT 2009 ...instead of Nov 30 2009 I... (4 Replies)
Discussion started by: hanton
4 Replies

3. Shell Programming and Scripting

how to get what date was 28 days ago of the current system date IN UNIX

Hi, Anybody knows how to get what date was 28 days ago of the current system date through UNIX script. Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies

4. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

5. UNIX for Dummies Questions & Answers

Comparing Output Date to Current System Date

Hi Guys, Anyone who knows how to compare the current date with the a file containing a date, say for example I have a file that looks like this: Command was launched from partition 0. ------------------------------------------------ Executing command in server server6 Fri Dec 16... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

6. Shell Programming and Scripting

Adding days to system date then compare to a date

Hi! I am trying to read a file and every line has a specific date as one of its fields. I want to take that date and compare it to the date today plus 6 days. while read line do date=substr($line, $datepos, 8) #date is expected to be YYYYMMDD if ; then ...proceed commands ... (1 Reply)
Discussion started by: kokoro
1 Replies

7. Shell Programming and Scripting

Compare the system date with date from a text file

I get the date that's inside a text file and assigned it to a variable. When I grep the date from the file, I get this, Not After : Jul 28 14:09:57 2017 GMT So I only crop out the date, with this command echo $dateFile | cut -d ':' -f 2,4The result would be Jul 28 14:57 2017 GMT How do I... (3 Replies)
Discussion started by: Loc
3 Replies

8. SCO

Cannot use 'date -t' to set the system date and time

Hi! All, I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330. The system gives me an error invalid option. This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)
Discussion started by: trolley
6 Replies

9. UNIX for Beginners Questions & Answers

Compare date in .txt with system date and remove if it's lesser than system date

Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt . I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies

10. Answers to Frequently Asked Questions

Compare date in .txt with system date and remove if it's lesser than system date

I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies
DAR_MANAGER(1)						      General Commands Manual						    DAR_MANAGER(1)

NAME
dar_manager - disk archive manager SYNOPSIS
dar_manager [-v] [-j] -C [<path>/]<database> dar_manager [-v] [-j] -B [<path>/]<database> -A [<path>/]<basename> [ [<path>/]<archive_basename>] dar_manager [-v] [-j] -B [<path>/]<database> -l dar_manager [-v] [-j] -B [<path>/]<database> -D <number>[-<number>] dar_manager [-v] [-j] -B [<path>/]<database> -b <number> <new_archive_basename> dar_manager [-v] [-j] -B [<path>/]<database> -p <number> <path> dar_manager [-v] [-j] -B [<path>/]<database> -o [list of options to pass to dar] dar_manager [-v] [-j] -B [<path>/]<database> -d [<path to dar command>] dar_manager [-v] [-j] -B [<path>/]<database> [-w <date>] [-e <extra options to dar>] -r [list of files to restore] dar_manager [-v] [-j] -B [<path>/]<database> -u <number> dar_manager [-v] [-j] -B [<path>/]<database> -f file dar_manager [-v] [-j] -B [<path>/]<database> -s dar_manager [-v] [-j] -B [<path>/]<database> -m <number> <number> dar_manager [-v] [-j] -B [<path>/]<database> -i dar_manager -h dar_manager -V DESCRIPTION
dar_manager is part of the Disk Archive suite. Its purpose is to simplify the restoration of a set of few files present in many backup, full or differential. This is achieved by gathering the catalogue of each archive (this has to be done once). At any time you just have to give the relative path to the files you want to restore, dar_manager will call dar with the proper options and restore the last version of each file (or the last version before given date). Note that dar_manager is to be used when you have remove some files by accident some time ago and wish to recover them. It thus not adapted to restore the state a directory tree had at a given time, in particular when some files have to be removed. For that you must use dar directly with the corresponding archive to the date for which you wish to restore the state. you can restore any file by hand without dar_manager , but if you make a lot of differential backup, you may spend many time to find the archive that contains the last version of your file, as dar will not save it if it has not changed since previous backup. dar_manager sim- plify the process by looking in its internal database, built from archive "catalogues". OPTIONS
-C, --create [<path>/]<database> creates an empty database that will collect informations about several archives. The <database> is a filename that is required for -B option. To destroy a <database> just remove the file. -B, --base [<path>/]<database> specify the database to read or modify. The <database> file must exist, and have a database structure (see -C option). -i, --interactive use a keyboard interactive text menu to do operations on the given database. So you may avoid reading the other options described in this manual page, if you wish, and just use the interactive option. You will however always have to create an empty database (-C option) and restore files manually (-r option). -A, --add [<path>/]<basename> [ [<path>/]<archive_basename>] add an archive to the database. An isolated catalogue can also be used only if it has been produced by dar version 1.2.0 or above. Why ? Because, an isolated catalogue produced by older version will always tell that no files are saved in the archive of reference, in that case the solution is to provide the archive itself as argument. An optional second argument is the basename of the archive if it is different from the first argument (need for extraction of files). For example you could have an isolated catalogue in first argument and the basename of the original archive (where is stored the data) as second argument. By default, dar_manager will look for an archive of reference in the command line used to create each archive, but in some cases, it may be necessary to specify the archive name (for example if you've changed its name). -l, --list displays the informations about the archives compiled in the database. In particular, a number is given to each ar- chive, which is required to some other option to design a particular archive within the database. Nothing avoids you to feed the database with several archive of the same basename ! You will just have to guess which one is asked under this name. :-) -D, --delete <number>[-<number>] removes an archive (or a range of archive) from the database. The number of the archive (or the min and max number or the archive range) is correspond to those given by the -l option. Note that all archive number greater than the one(s) to be delete will be decremented to keep continuous numbering of the archive inside the database. -b, --base <number> <new_archive_basename> this option allows you to rename the archive basename (used when restoring files from it) -p, --path <number> <path> this option allows you to change the location of a given archive (used when restoring files from it) -o, --options [list of option to pass to dar] Specify the option to use when calling dar. Each call erases the previous setting. Possible dar options are all the available ones except "-x" and simple arguments (the [list of path]) which will be added by dar_manager itself. -d, --dar [<path>] Set the path to dar. If no argument is given, dar is expected to be located in the PATH -r, --restore [list of files to restore] dar_manager will restore all (an only) the given files, asking for the proper archive only. Last version of each file over several archive is based on the modification time of the inode, thus if you have a more recent backup that con- tains an old version of a given file, a older archive could be used to restore the file, if its last modification time (mtime) is more recent. Note that files listed after -r option, must never have an absolute path. They will be restored under the directory specified with -R option of dar (thus using -o option), or by default, in subdirectories of the current directory. -w, --when <date> alters the -r option behavior: still restores the files in the most recent version available but only before the given date (versions of more recent dates are ignored). The <date> must respect the following format [ [ [year/]month/]day-]hour:minute[:second]. For example "22:10" for 10 PM past 10 or the current day, "7-22:10" for 10 PM past 10 the 7th of the current month, "3/07-22:10" for the 7th of march at 22:10 of the current year, "2002/03/31-14:00:00" the date of the first dar's release ;-). The given date must be in the past, of course, and is compared to the "last modification" date of the saved files and not to the date at which archives have been done. Thus if a file has been changed long ago but saved in a recent (full) archive, it will be elected for restoration even for dates older than the creation of the archive. In the other way, a file saved long time ago with a mtime that was set to a date in the future will not be elected for restoration when giving the date at which was done the archive. -e, --extra <options> pass some more options to dar. While the -o options takes all that follows on the command line as argument to pass to dar and write theses in the database, the -e option does not alter the database and has only one argument. In other words, if you need to pass several options to dar through the use of the -e option, you need to use quotes (simple quotes ' or double quotes ") to enclose theses options. Example: dar_manager -B database.dmd -e "-w -v -p -b -r -H 1" -r some/files -u, --used <number> list the files that the given archive owns as last version available. Thus when no file is listed, the given archive is no more useful in database, and can be removed safely (-D option). If <number> is zero, all available file are listed. -f, --file <file> displays in which archive the given file is saved, and what are the modification date (mtime) and change date (ctime). -s, --stats show the number of most recent files by archive. This helps to determine which archive can be safely removed from the database. -m, --move <number> <number> changes the order of archives in the database. The first number is the number of the archive to move, while the second is the place where it must be shifted. Archie order is important only in the case a file to be restored has EA that has been saved in an archive and data saved in another archive. This takes place when making a differential backup for file that have no change in data but changes in EA. In that case, the database must be fed (-A option) with archive in the order they have been created. If dar_manager detects such a disorder, it issues a warning is giving the name of the file that could not be restored properly (only EA have not been restored with the last version). Note that, if you don't use EA the order of archives in the database has no importance. -Q Do not display any message on stderr when not launched from a terminal (for example when launched from an at job or crontab). Remains that any question to the user will be assumed a 'no' answer, which most of the time will abort the program. -j, --jog when virtual memory is exhausted, as user to make room before trying to continue. By default, when memory is exhausted dar aborts. -v, --verbose displays additional information about what it is doing. -h, --help display help usage -V, --version display software version EXIT CODES
dar_manager exits with the following code: 0 Operation successful. 1 see dar manual page for signification 2 see dar manual page for signification 3 see dar manual page for signification 7 see dar manual page for signification 8 see dar manual page for signification 11 and above dar called from dar_manager has exited with non zero status. Substract 10 to this exit code to get dar's exit code. SIGNALS
dar_manager acts like dar (see dar man page for list of signals), upon certain signal reception dar aborts cleanly SEE ALSO
dar(1), dar_xform(1), dar_slave(1), dar_cp(1) LIMITATIONS
at most 65534 archives can be compiled in a given database, which should be enough for most users. Dar_manager does not support encrypted archives for now and archive cannot neither be encrypted. See the FAQ for a workaround. KNOWN BUGS
none actually AUTHOR
http://dar.linux.free.fr/ Denis Corbin France Europe 3rd Berkeley Distribution OCT 30th, 2006 DAR_MANAGER(1)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy