Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions on search techniques...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Good day !
Here are my questions:
1) How can i find those files that are not owned by root or a user AND
not start with the letter "b" nor end with letter "c"?

2) What's the difference between two commands below:
a) find . -mtime +5
b) find . -mtime -5

3) How can i count and display the frequency of occurence of each letter
in the alphabet(ignore case) from an input file called ABC?

That's all of my questions.
Thanks a lot.
 
Is this your homework? [sig]<p>Ged Jones<br><a href= > </a><br>Top man[/sig]
 
First:
[tt]
find . -n \( -user root -o -name &quot;b*&quot; -o -name &quot;*c&quot; \) -print
[/tt]
Second:
[tt]-mtime +5[/tt] shows files modified more than five days ago and [tt]-mtime -5[/tt] shows files modified less than five days ago.

I hope it works... [sig][/sig]
 
ya..this is part of my assignment.
i'm new to UNIX... those 'fascinating' commands
almost crack my head.
i've read through some books, it just taught me those
basic stuff.
Sometimes i really don't know how to use those like:
sed, grep, find, awk, etc in COMBINATION manner.
Anywhere, thanks for u guys helping me on this.

To ElgisRamon:
Refer to the answer of Q1, are there any ways to let me
find those files that are OWNED by USER which begin with character 'jo' OR 'ke'?
i've tried it in this way but not work:
find . -user 'jo' || 'ke'

Seems the option '-user' cannot be used with metacharacters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top