This will give you the latest file under $basedir, recursively :
Note that it will work only for files modified in the last 24 hours, you can change the mtime parameter to higher if needed.
Maybe there's a simpler way...
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( (3 Replies)
Hey Guyz I have a requirement something like this..
a part of file name, date of modification of that file and a text is entered as input.
like
Date : 080206 (MMDDYY format.)
filename : hotel_rates
text : Jim
now the file hotel_rates.ZZZ.123 (creation date is Aug 02 2006) should be... (10 Replies)
Hi,
Would appreciate if someone could help me with the following requirement.
Say I have a directory where a file called abc_$timestamp.txt is created couple of times in a day.
So this directory would have files like
abc_2007-03-28-4-5-7.txt
abc_2007-03-28-3-5-7.txt... (4 Replies)
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (2 Replies)
Please help me out how to identify the latest file in one directory by looking at file's timestamp or datestamp. You can say using system command. Thanks (10 Replies)
Is there a way to use find command to get the latest file and cp it into a certain dir at the same try.
example find the latest file and cp to a diff dir. (5 Replies)
Hi All,
This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance.
For a project I need to do the following.
1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
I have tried the following code and with that i couldnt achieve what i want.
#!/usr/bin/bash
find ./ -type f \( -iname "*.xml" \) | sort -n > fileList
sed -i '/\.\/fileList/d' fileList
NAMEOFTHISFILE=$(echo $0|sed -e 's/\/()$*.^|/\\&/g')
sed -i "/$NAMEOFTHISFILE/d"... (2 Replies)
Discussion started by: gold2k8
2 Replies
LEARN ABOUT DEBIAN
ocs
ocs(1) General Commands Manual ocs(1)NAME
ocs - creates and maintains the database for cscope on a recursive directory set
SYNOPSIS
ocs [-x] [-f] [-q] [-u]
DESCRIPTION
This manual page briefly documents ocs , a shell script wrapper that automates the creation and maintenance of a cscope(1) database on a
recursive set of directories. Under normal circumstances, ocs generates a cscope database on a recursive group of directories starting from
the current working directory, before launching cscope(1) in interactive mode.
OPTIONS -x Enable debugging.
-f Force. Do not ask about regenerating 'TMP' lists (lists generated by ocs ), just do it; Allow the regeneration of 'CSD' (lists gen-
erated by cscope(1) ) lists.
-q Tell cscope to build a fast reverse index. Database disk space usage is doubled, but searching speed is increased.
-u Request that the database be updated or regenerated.
FILES
./cscope.rc
If this is an executable shell script, it will be included in the body of ocs in order to override intenal filenames and other
options. See the comments at the top of /usr/bin/ocs for more information.
BUGS
None noted.
SEE ALSO cscope(1), /usr/bin/ocs.
AUTHORS
This manpage originally prepared by Nick Rusnov <nick@grawk.net> for the Debian Project.
The Debian Project June 2001 ocs(1)