Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Find the newest file in two directories Post 302878318 by joeyg on Thursday 5th of December 2013 01:39:02 PM
Old 12-05-2013
So, do the same files exist in both directories?
Are you only looking at two directories to determine which is the most current?

If so, I am thinking to simply 'cut' the first column from file one to get a list of items to search.
Then, process through that list to determine which directory has the most recent file.
 

10 More Discussions You Might Find Interesting

1. Programming

to find a file in set of directories

Hi, what is the command in unix to find a file abc.c in a directory which had n number of sub-directories. thanx (3 Replies)
Discussion started by: jazz
3 Replies

2. Shell Programming and Scripting

Find a file in sub-directories.. o/p just the path

Hello All, I am somehow stumped with this ting. 'Find' will sure show me.. but I want only thepath of all the occurences of the file in any of the sub-dirs.. Any help will be sincerely appreciated. thanx! (3 Replies)
Discussion started by: pranavagarwal
3 Replies

3. Shell Programming and Scripting

find directories that do NOT contain a certain file extension

for x in `find /vmfs/volumes/v01tstn01a01/ -type d`; do find $x -name '*.vmx' > /dev/null || echo $x; done; The goal of this is to find the subdirectories that do NOT contain a file with the extension of .vmx Any help would be great! (6 Replies)
Discussion started by: hodnov
6 Replies

4. Shell Programming and Scripting

Find Directories That Do Not Contain A Certain File

I'm having problems figuring out the process to find directories that DO NOT contain a certain file. I have a mp3 collection that all the album art is name "folder.jpg". Not all the albums have images. I need a way to find the albums/directories that do not contain "folder.jpg". I can find the... (2 Replies)
Discussion started by: subsonic
2 Replies

5. Shell Programming and Scripting

How to find the recent file in many sub-directories?

Hi guys, Under my root directory there are many sub-directories which contains log file for every day of running. How can I find , in one command only, the recent log file in each sub-directory? For example, If I run the following: find . -name "exp_prod_*_*_yes_*_.log" -exec ls -ltr {} \;... (12 Replies)
Discussion started by: nir_s
12 Replies

6. UNIX for Dummies Questions & Answers

How to sort output from find from oldest to newest?

Hi, How do I sort the output of find to provide a listing of files from oldest to newest? For example, if I do a find /tmp -type f -print I want the output to be sorted in the order of the oldest to the newest file. Thanks in advance. (2 Replies)
Discussion started by: newbie_01
2 Replies

7. UNIX for Dummies Questions & Answers

Using grep command to find the pattern of text in all directories and sub-directories.

Hi all, Using grep command, i want to find the pattern of text in all directories and sub-directories. e.g: if i want to search for a pattern named "parmeter", i used the command grep -i "param" ../* is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies

8. UNIX for Dummies Questions & Answers

Getting directories resulted from Find in one file

Hi Need help for the following scenario. I am having two directories /tmp/a and /tmp/b. /tmp/a again has subdirectories /tmp/a/aa and /tmp/a/ab. I want to run a script from /tmp/b to search for a file user.lst in the folders /tmp/a/aa and /tmp/a/ab, if available, i want to make a file in... (3 Replies)
Discussion started by: sudeep.id
3 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Find entries from one file in another

Please help. I want to read a file line by line (only 1 column) and print all corresponding rows from a second file (2 columns) . Only first column of second file has to be matched with only column of first file. Order of lines in output doesn't matter. Simplified example Input 1 A B... (6 Replies)
Discussion started by: newbie83
6 Replies

10. Shell Programming and Scripting

Find file by filename or with newest modified date

Hi, I have a directory that has numerous files in it, and there is two which are named "filerec_ddmmyyHH24MMSS" by the time they are created so "filerec_010615012250" was created at 01:22:50 on 1st June 2015. I need to find the most recently created of those 2 files and get the contents of... (4 Replies)
Discussion started by: finn
4 Replies
catman(1M)																catman(1M)

NAME
catman - create cat and whatis files for online manpages SYNOPSIS
alt-path] [sections] DESCRIPTION
The command creates the formatted versions of the online manpages from source files. Each manpage in the and directories is examined, and those whose formatted versions are missing or out-of-date are recreated. formats the most recent of the entries, compresses it, and puts it into the appropriate directory. If any changes are made, recreates the database. By default, the database is overwritten. If the environment variable is set to a nonde- fault set of paths, the old database file is saved in so that, if desired, the system administrator may merge them together. By default, searches the and subdirectories under the following directories: If is set in the environment, the directories given in are checked instead of the default. See environ(5) for a description of the envi- ronment variable. Before running remove any existing directories. If the option is used, directories should be removed instead. If both and directories exist, man(1) updates both directories and more space is used. Any command-line parameters not starting with are interpreted as a list of manpage sections (directories) to search. For example: restricts updating to manpage sections 1, 2, and 3 (directories and Options supports the following options: Create a merged database; i.e., information on new manpage entries (added since the last time was run) is merged into the current database rather than overwriting it. Ignored if selected with the option. Prevent creation of Print what would be done instead of doing it. Cause only the database to be created. No manpage reformatting is done. Put the formatted entries in the directories rather than in the directories. Perform actions based on the given alternate root. With this option, alt-path will be prefixed to all directory paths, including default paths, the paths defined by and the path to EXTERNAL INFLUENCES
Environment Variables defines parent directories to be used when searching and directories. WARNINGS
If unformatted manpages (those in the subdirectories) have been removed since the last time was run, information in the database may be lost. The option may be used to override this, but may result in repeated lines in the database for the same manpage. EXAMPLES
Create uncompressed files for sections 1 and 1m of the manual, but don't create the database: Run from a server to create entries for a diskless client under the alternate root This will create manpages under: and a file in: Create entries for an application and merge the information with the database: Note that you may wish to save before doing this, so as not to lose your current AUTHOR
was developed by HP and the University of California, Berkeley. FILES
Unformatted source) manpage files [compressed]. Formatted manpages [compressed]. Database of manpage entry summaries; utilized by the command. Command to make database. SEE ALSO
compress(1), fixman(1M), man(1), environ(5). catman(1M)
All times are GMT -4. The time now is 11:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy