9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to find all jpg files and then sort them by modification date. This is where I started.
find . -type f -name "*.jpg"
I tried to pipe a sort in there but that did not seem to work. Do I need to use xargs? (10 Replies)
Discussion started by: cokedude
10 Replies
2. Shell Programming and Scripting
Used below command to get list of files sorted by timestamp
find -L . -type f -name '*dat*' | xargs ls -ltrg
I want to get only the filenames so I tried adding basename but it doenst work , can some one advise on how to get only file name (1 Reply)
Discussion started by: lalitpct
1 Replies
3. Shell Programming and Scripting
Hi,
I have two text files
file 1 with N lines
AAAAA 2.092290E-12
BBBBB 1.727740E-07
CCCCC 9.608710E-17
DDDDD 0.000000E+00
EEEEE 0.000000E+00
FFFFF 0.000000E+00
GGGGG 0.000000E+00
HHHHH 0.000000E+00
IIIII 3.300320E-04
...
The text in the first column is unique for each row and... (4 Replies)
Discussion started by: f_o_555
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a problem with a shell script.
The script should find all .cpp and .h files and list them.
With:
for file in `find $src -name '*.h' -o -name '*.cpp'
it gives out this:
H:\FileList\A\E\F\G\newCppFile.cpp
H:\FileList\header01.h
H:\FileList\B\nextCppFile.cpp
... (4 Replies)
Discussion started by: shellBeginner75
4 Replies
5. Shell Programming and Scripting
HI
Find command is sorting differently in different machines.
I am trying a script to find file with -name option and delete the files other and keep the latest. the problem I am facing is in one machine find command is returning output sorted with oldest first and latest . But in another... (1 Reply)
Discussion started by: ningy
1 Replies
6. Linux
Hi,
I need to look for a config file (ldap.conf) and pick the latest modified file.
`locate` tells me there are many ldap.conf's, some in /etc, /usr, /home, etc.
Is there some way I can sort them by last modified time via bash?
I was thinking maybe I could pipe the output of `locate` to `ls... (4 Replies)
Discussion started by: Housni
4 Replies
7. UNIX for Dummies Questions & Answers
Hi - are there sort options with the find command? I don't see any in man. I have a script that is looping through a set a files to be processed and I need to process them in date timestamp order. tia
for file in `find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN1}`
do....
... (6 Replies)
Discussion started by: mavsman
6 Replies
8. Shell Programming and Scripting
Perl file::find can I sort the out put
I am using file::find in my script but how I wish to process each file found in date order.
Can I sort this module?
eg
part of current script is....
use File::Find;
# Recursively find all files and directories in $mqueue_directory
find(\&wanted,... (2 Replies)
Discussion started by: Andrek
2 Replies
9. UNIX for Dummies Questions & Answers
Hi--
Ok. I have now found that:
find -x -ls
will do what I need as far as finding all files on a particular volume. Now I need to sort the results by the file's modification date/time.
Is there a way to do that?
Also, I notice that for many files, whereas the man for find says ls is... (8 Replies)
Discussion started by: groundlevel
8 Replies