Sponsored Content
Top Forums Shell Programming and Scripting How to read files by Server Creation date wise? Post 302802891 by hiten.r.chauhan on Sunday 5th of May 2013 10:37:25 AM
Old 05-05-2013
Get the list of file names in $file_name sorted with time
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Moving files based on creation date

Howdy, I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!! Thanks! :D (1 Reply)
Discussion started by: dgoyea
1 Replies

2. Shell Programming and Scripting

how to read i-node informations (date of creation)

Hi, I'm looking for a way to get the date of creation for a file. Is it possible ? I know that these informations are in the i-node but I don't know how to access them (if the 'find' command can do it with option -ctime, I have reasons to believe in it). Thanks for helping me ! (1 Reply)
Discussion started by: mullmafr
1 Replies

3. Shell Programming and Scripting

URGENT: Script/Function needed to read text property files in block wise

Hi, Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example: Heading Name Descripton Block Block1 Value1 Description Property Name Value Property Name Value Property Name Value Property Name Value Property Name... (7 Replies)
Discussion started by: ysreenivas
7 Replies

4. Shell Programming and Scripting

Need to zip the files date wise --urgent Help needed

Hi all, this is my first post, i need to write a script to zip the files with datewise below are the log files. -rw------- 1 root sso 85316156 May 24 22:11 core_test_smservaz_104_104_1243217459_8896 -rw------- 1 root sso 90413304 May 25 22:12 core_test_smservaz_104_104_1243303895_20912... (4 Replies)
Discussion started by: lcschandu
4 Replies

5. Solaris

delete files by date wise

Hi guys, I want to delete files from june 13 to june 30, using rm command can any one tell me the sintax to remove. I ahve hunderd of core files in my /var dir. so i want to clear last month core files. Thanks in Advance.:)) (2 Replies)
Discussion started by: kurva
2 Replies

6. UNIX for Dummies Questions & Answers

Select all files in a folder based on creation date (ls command)

Hi All, <Re-posting in Correct group> I'm trying to select all the files in a folder that starts with a particular name format and are created in a gven date range using 'ls' command...but i'm not successful.... Example : I'm trying to see all the text files in a folder who names start... (6 Replies)
Discussion started by: Satya C1
6 Replies

7. Shell Programming and Scripting

Extract count of string in all files and display on date wise

Hi All, hope you all are doing well! I kindly ask you for shell scripting help, here is the description: I have huge number of files shown below on date wise, which contains different strings(numbers you can say) including 505001 and 602001. ... (14 Replies)
Discussion started by: VasuKukkapalli
14 Replies

8. Shell Programming and Scripting

Bourne returning files based on creation date

I'm wanting to write a bourne shell script that takes in two command line arguments - a directory and a file. With this I want to return a list of files within the directory that are older (based on creation date) than the given file, and print the number of files that have not been listed (they... (4 Replies)
Discussion started by: britty4
4 Replies

9. UNIX for Beginners Questions & Answers

Copy files in order of creation date

Hi everyone :-) I ran into a small issue. I would like to copy some files in the precise order they were created. So the oldest files should be copied first and the newest ones last. I tried cp -r $(ls -1t) ./destination but the files are still not sorted properly. I was thinking, that... (11 Replies)
Discussion started by: officiallyme
11 Replies
touch(1)						      General Commands Manual							  touch(1)

NAME
touch - update access, modification, and/or change times of file SYNOPSIS
ref_file time] file_name... Obsolescent time_str file_name... DESCRIPTION
updates the access, modification, and last-change times of each argument. The file name is created if it does not exist. If no time is specified (see date(1)) the current time is used. The and options are mutually exclusive. Options The following options are available: Change the access time of file_name to time, or to the current time if time is not specified. Do not change the modification time unless is also specified. Change the modification time of file_name to time, or to the current time if time is not specified. Do not change the access time unless is also specified. Silently prevent from creating the file if it did not previously exist. Do not write any diagnostic messages concerning this condi- tion. Use the corresponding time of ref_file instead of the current time. Use the specified time instead of the current time. The option argument is a decimal number of the form: [[CC]YY]MMDDhhmm[.SS] where each two digits represents the following: CC The first two digits of the year. YY The second two digits of the year. MM The month of the year (01-12). DD The day of the month (01-31). hh The hour of the day (00-23). mm The minute of the hour (00-59). SS The second of the minute (00-61). If neither CC nor YY is given, the current year is assumed. If YY is specified, but CC is not, CC is derived as fol- lows: (taken into account the local time factor) If YY is: CC becomes: ------------------------ 69-99 19 00-68 20 If the resulting time value precedes the Epoch (00:00:00 January 1, 1970 Greenwich Mean Time), exits immediately with an error status. The range for SS is 00 through 61 rather than 00 through 59 to accommodate leap seconds. If SS is 60 or 61, and the resulting time, as affected by the environment variable, does not refer to a leap second, the resulting time is one second after a time where SS is 59. If SS is not given a value, it is assumed to be 0. The syntax shown by the second line is recognized when neither the option, the option, nor the option delimiter is specified, and the first operand consists of all decimal digits. This operand is interpreted as the time argument instead of as a file name. However, in this case, time_str is assumed to be of the form: MMDDhhmm[YY] This is for backward compatibility. The form given above is recommended for future portability. The option delimiter can be used before the first file_name if there is a possibility that file_name consists of all digits, in order to ensure that the first syntax is used. succeeds when invoked by the of the file if any of the following are true: o A time is specified. o Only the access time of the file is being updated. o Only the modification time of the file is being updated. In addition, succeeds when invoked by a user with write permission on the file if of the following are true: o No time is specified. o the access time and modification time of the file are being updated. EXTERNAL INFLUENCES
Environment Variables If the time is specified via the option, is used to interpret the time for the specified time zone. determines the language in which messages are displayed. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multibyte character code sets are supported. RETURN VALUE
returns the following values: All file_name arguments were successfully changed. Prints out a diagnostic message if an invalid time or a time earlier than the Epoch was specified with the option, or if the and options were both specified, or if one or more of the file_name arguments could not be accessed. EXAMPLES
The following command sets the modification and access times of the file named "bastille" to midnight, July 14, 1989, creating the file if it does not already exist. The following command does the same thing using the backward-compatible syntax: The following command sets the time of the two files named "0714000089" and "bastille" to the current time, creating them if they do not exist: To create a zero-length file, use any of the following: DEPENDENCIES
NFS An attempt to touch a file owned by the superuser on a remote server can fail, even if the invoking user has write permission on the file. SEE ALSO
date(1), utime(2). STANDARDS CONFORMANCE
touch(1)
All times are GMT -4. The time now is 08:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy