03-24-2003
When you do something like this, each time that ls runs, it will be with a single file name. So using -l to sort the output doesn't make sense.
And your -name "*" is going to match everything.
find $dir -type f -exec grep -q abc {} \; -exec ls -Fl {} \;
is the syntax that comes closest to what you're trying to do. Only if the first exec succeeds will the second exec be attempted. The order is important.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies
2. UNIX for Dummies Questions & Answers
Currently iam working on solaris environment,
Iam using find command to get list of all files between any two given dates. But the find command is not listing files accord. to timestamp. I tried using -exec option as -exec ls -ltr {} \;
Still the files are not listed according to timestamp..... (8 Replies)
Discussion started by: thanuman
8 Replies
3. UNIX for Advanced & Expert Users
Hi all,
I need help to find out if it is possible (if so, how? :D ) to move a hard link to a given file without making the main file i-node modification time change.
That is:
I have a file myFile.txt ,
and I have a link myLink.dat to that file (obtained by: ln myFile.txt myLink.dat).... (1 Reply)
Discussion started by: gian1975
1 Replies
4. Shell Programming and Scripting
Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same.
Thanks in advance.
Regards
Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies
5. UNIX for Dummies Questions & Answers
I have a requirement to find the time difference in second between 2 given time stamps. An example scenario is shown below:
30 Oct 11:42:29:992 DEBUG org.apache.commons.digester.Digester - New match='form-validation/global/validator' (IID=, TID=)
30 Oct 11:42:29:993 DEBUG... (0 Replies)
Discussion started by: Alecs
0 Replies
6. AIX
HI All,
can some one please help me how to fine the difference between two time stamps say
a= Nov 10, 2009 9:21:25 AM
b= Nov 10, 2009 10:21:25 AM
I want to find difference between the a & b
I googled and tried with some options but no luck.
My OS is AIX (1 Reply)
Discussion started by: bandlan9
1 Replies
7. Linux
Hi,
I'm using the following command to find the multiple requierd file types and its working fine
find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f
Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies
8. Shell Programming and Scripting
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies
9. Shell Programming and Scripting
OK.
if the first file is :
3184 2014-07-28 04:15 global.Remote-Access 10.111.8.25 81.245.6.25 tcp 3268
3035 2014-07-28 04:16 global.Remote-Access 10.111.8.12 81.245.6.25 tcp 3268If the second file is:
1 Jul 28 04:12 2014-07-28 id967254(BGC-TLW-Cert) Tunneling: User with IP... (8 Replies)
Discussion started by: fxsme
8 Replies
10. Shell Programming and Scripting
On my linux box, I have a file say dump.txt.
I then need to move to another seperte folder and need to find only one file with extension *.tar that has the closest timestamp after / next to the timestamp of the dump.txt. (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT BSD
nftimestamp
NFTIMESTAMP(8) System Manager's Manual NFTIMESTAMP(8)
NAME
nftimestamp - Set Notesfile sequencer timestamps
SYNOPSIS
nftimestamp [ -v ] [ -t ] notesfile [ notesfile ]
DESCRIPTION
The Notesfile system uses timestamps to determine which articles in a notesfile have been read by an individual user. The timestamps are
compared with arrival times of the individual articles to determine if a user has seen that article. Nftimestamp provides a simple mecha-
nism for updating many timestamps.
In the usual case, nftimestamp is invoked with a list of notesfiles. The invoking user's sequencer timestamps for the specified notesfiles
are set to the current time. The -t option allows the user to specify some different time. Notesfiles are specified in the same manner as
on the notes command line. Include notesfiles by using their name; the shell wildcard characters (?*[]) are correctly expanded. Exclude
notesfiles be prefixing their name with an exclamation mark: !notesfile. The -f option reads a list of notesfiles to be included and
excluded from the specifid file.
The Notesfile Administrator can use the -u option to set the sequencer for systems and other users.
The seqtoascii and seqtobinary utilities provide the same function as this program. Using those programs, the user must change each time-
stamp manually and then restore the sequencer file. Nftimestamp provides a simpler interface.
FILES
/etc/passwd for the users name
/etc/group for the users group
/usr/spool/notes the default notesfile data base
SEE ALSO
notes(1), seqtoascii(1), seqtobinary(1),
The Notesfile Reference Manual
AUTHORS
Ray Essick (uiucdcs!essick, essick@a.cs.uiuc.edu)
University of Illinois at Urbana-Champaign
Urbana, IL
University of Illinois NFTIMESTAMP(8)