Sponsored Content
Top Forums Shell Programming and Scripting List the file or files with last modification date Post 302360934 by KitFisto on Sunday 11th of October 2009 02:37:05 PM
Old 10-11-2009
Hi thanks for your response. But what it in this case:

-rw-r--r-- 13 09/23/09 15:52:38 ./aa/FileName
-rw-r--r-- 13 09/23/09 15:52:38 ./aa/dd/FileName
-rw-r--r-- 16 09/23/09 15:52:38 ./cc/cc/FileName
-rw-r--r-- 16 09/23/09 15:54:34 ./cc/FileName
-rw-r--r-- 13 09/23/09 15:54:03 ./aa/dd/FileName
-rw-r--r-- 6 09/23/09 15:54:23 ./bb/FileName

and I run your command it only shows me 2 lines when it is suppose to show 3 because the three first lines have the same modification date.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

command for modification date of a file

Good morning, I would like to find all files of a certain type and display their name as well as their modification date. In order to do this, I would do the following: find ./ -name *.csv | ???????? My question: what to put after the pipe instead of the question marks? Is there a basic... (5 Replies)
Discussion started by: scampsd
5 Replies

2. Shell Programming and Scripting

Copy files based on modification date

How to copy files from a location to a directory <YYMM> based on last modification date? This will need to run daily. I want to copy those file for May to 0905 and Jun to 0906. Appreciate your guidance.:) Thanks. -rw-rw-rw- 1 ttusr tgrp 4514 May 29 21:49 AB24279J.lot_a... (17 Replies)
Discussion started by: KhawHL
17 Replies

3. UNIX for Advanced & Expert Users

Help with sorting files according to modification date

Hi, I was very surprised to not be able to find an answer to this question despite my best efforts in Google and elsewhere. Maybe it's a good thing as it forced me to finally become a member in this great forum that i use frequently. Ok my question: I want to be able to sort files inside a... (3 Replies)
Discussion started by: stavros
3 Replies

4. Shell Programming and Scripting

Rename old files with last modification date

Hi everyone, I have files like file1_Mod.txt, file2_Mod.txt. I want to rename the old files with the last modification date. I write the below script to rename with current date, but I donīt know how to use "date -r" to get the last modification date with the same format I have below... (5 Replies)
Discussion started by: cgkmal
5 Replies

5. 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

6. Shell Programming and Scripting

Move files from one directory to another based on creation/modification date

Hi All, Really stuck up with a requirement where I need to move a file (Lets say date_Employee.txt--the date will have different date values like 20120612/20120613 etc) from one directory to another based on creation/modification dates. While visiting couple of posts, i could see we can... (3 Replies)
Discussion started by: dsfreddie
3 Replies

7. UNIX for Dummies Questions & Answers

How do you get the last modification date of a file?

I'm trying to get the date output to be in the form yyyy-mm-dd (e.g. 2013-01-18) !/bin/sh modDate=$(stat -c %y $1) echo $modDate >> $1 When I run this on another file (by typing ./dateScript theFile.txt), I keep getting this message: stat: illegal option -- c What's wrong with my code... (2 Replies)
Discussion started by: Nate18
2 Replies

8. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

9. Shell Programming and Scripting

Sort and move multiple files by modification date

Hi I have a problem, I have a large group of archive files in a folder some are later versions of the same archive, the only difference btween them is that the archiving program we use appends the name with a code for it to keep track of in its data base, and the modification date. I am starting... (6 Replies)
Discussion started by: Paul Walker
6 Replies

10. Shell Programming and Scripting

Subtract a file's modification date with current date

SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise Hi, In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file. How do I achieve this? Regards, Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
Execute(4)						     Kernel Interfaces Manual							Execute(4)

NAME
Execute - Contains instructions for running commands that require the resources of a remote system SYNOPSIS
/usr/spool/uucp/SystemName/X.RemoteSystemNxxxx DESCRIPTION
The Execute (X.*) files contain instructions for running uucp commands that require the resources of a remote system. They are created by the uux command. The full pathname of a uux command execute file is a form of the following: /usr/spool/uucp/SystemName/X.RemoteSystem- Nxxxx where the SystemName directory is named for the local computer and the RemoteSystem directory is named for the remote system. The N char- acter represents the grade of the work, and the xxxx notation is the 4-digit hexadecimal transfer-sequence number; for example, X.zeusN2121. Note that the grade of the work specifies when the file is to be transmitted during a particular connection. The grade notation is a sin- gle number (0 to 9) or letter (A to Z, a to z). Lower sequence characters cause the file to be transmitted earlier in the connection than do higher sequence characters. The number 0 (zero) is the highest grade, signifying the earliest transmittal; z is the lowest grade, sig- nifying the latest transmittal. The default grade is N. Standard Entries in an Execute File An execute file consists of several lines, each with an identification character and one or more entries: Format and Description U UserName SystemName Specifies the login name of the user issuing the uux command and the name of the system from which the command was issued. N or Z Indicates the error status. The N character means that a failure message is not sent to the user issuing the uux command if the specified command does not exe- cute successfully on the remote system. The Z character means that a failure message is sent to the user issuing the uux command if the specified command does not execute successfully on the remote system. R UserName Specifies the login ID of the user requesting the remote command execution. F FileName Contains the names of the files required to execute the specified command on the remote system. The FileName parameter can be either the complete pathname of the file, including the unique transmission name assigned by the uucp program, or simply the trans- mission name without any path information. The Required File Line can contain zero or more filenames. The uuxqt daemon checks for the existence of all listed files before running the specified command. I FileName Specifies the standard input to be used. The standard input is either specified by a < (less than) symbol in the command string, or is inherited from the standard input of the uux command if that command was issued with the - (dash) flag. If standard input is specified, it also is listed in an F (Required File) line. If standard input is not specified, the uucp program uses the /dev/null device file. O FileName SystemName Specifies the names of the file and system that are to receive standard output from the execution of the command. Standard output is specified by a > (greater than) symbol within the command string. (The >> sequence is not valid in uux commands.) As was the case with standard input, if standard output is not specified, the uucp program uses the /dev/null device file. C CommandString This is the command string that the user requests to be run on the specified system. The uucp program checks the /usr/lib/uucp/Per- missions file on the designated computer to see whether the login ID can run the command on that system. All required files go to the execute file directory, usually /usr/spool/uucp/.Xqtdir. After execution, the standard output is sent to the requested location EXAMPLES
User fong on local system zeus enters the following command: uux - "diff /u/fong/out hera!/u/fong/out2 > ~uucp/DF" This invokes the uux command to run a diff command on the local system, comparing file /u/fong/out with file /u/fong/out2, which is stored on remote system hera. The output of the comparison is placed in the DF file in the public directory on the local system. This command produced the /usr/spool/uucp/hera/X.zeusN212F execute file, which contains the following information: U fong zeus # return status on failure Z # return address for status or input return R fong F /usr/spool/uucp/hera/D.herale954fd out2 O ~uucp/DF zeus C diff /u/fong/out out2 The user line identifies user fong on system zeus. The error status line indicates that fong will receive a failure status message if the diff command fails to execute. The requester is fong, and the file required to execute the command is the following data file: /usr/spool/uucp/hera/D.herale954fd out2 The output of the command is to be written to the public directory on system zeus with the filename DF. (Remember that ~uucp is the shorthand way of specifying the public directory.) The final line is the command string that user fong entered with the uux command. The following is another example of an execute file: U uucp hera # don't return status on failure N # return address for status or input return R uucp F D.hera5eb7f7b I D.hera5eb7f7b C rmail fong This indicates that user uucp on system hera is sending mail to user fong, who is also working on system hera. FILES
Describes access permissions for remote systems Describes accessible remote systems Contains uucp command, data, and execute files Contain instructions for transfers Contains lists of commands that remote systems are permitted to execute Contains files that have been trans- ferred RELATED INFORMATION
Daemons: uuxqt Commands: diff(1), uux(1) delim off Execute(4)
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy