08-19-2008
advanced unix find
The find should search only for directories modified down to two levels.
I tried max depth, but it is not working.
find $div/users -type d -mtime +1 -maxdepth 2
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I know that my FreeBSD OS has commands mkdir or mkfile?
Can I do like this:
find / -name mkdir
find / -name mkfile
But I do not see them???
Thanks. (1 Reply)
Discussion started by: lacasa
1 Replies
2. Shell Programming and Scripting
given a start directory,a filename,how to find it? (3 Replies)
Discussion started by: bluo
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I trying to get my head around using the find command and i wanted to list a selection of files that are older than 30 days. i used 'find . -mtime +30' and it lists all the files including other files from the current location's sub directory. i then used the prune option but it seems it... (5 Replies)
Discussion started by: scriptingmani
5 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 need help with tweaking the unix find command. currently the find command searches all the directories under $div/users modified in the last 1 day.
find $div/users -type d -mtime +1
I need this changed to find only subdirectories and sub-subdirectories modified in the last 1 day under... (1 Reply)
Discussion started by: mnnarendra
1 Replies
6. Shell Programming and Scripting
hello forum memvers,
1:I have to write a script for find a string and replace with another string.
2:In shell script how to replace one string with another string.:b: (4 Replies)
Discussion started by: rajkumar_g
4 Replies
7. UNIX for Dummies Questions & Answers
This command is intended to compare two drives to see if all files are identical, can some one please decode what it is doing.
find / -path /proc -prune -o -path /new-disk -prune -o -xtype f -exec cmp {} /new-disk{} \; (2 Replies)
Discussion started by: Tirmazi
2 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I've been stuck on this problem for 2 days now
What command would you enter to list the first lines of all text... (11 Replies)
Discussion started by: partieboi37
11 Replies
LEARN ABOUT OPENSOLARIS
hal-find
hal-find(1M) System Administration Commands hal-find(1M)
NAME
hal-find, hal-find-by-capability, hal-find-by-property - search HAL global device list
SYNOPSIS
hal-find-by-capability --capability capability [--help]
[--verbose] [--version]
hal-find-by-property --key key --string value [--help]
[--verbose] [--version]
DESCRIPTION
The hal-find commands, hal-find-by-capability and hal-find-by-property, search the Hardware Abstraction Layer (HAL) device list by speci-
fied criteria and displays results on the standard output. hal-find-by-capability searches by capability, such as volume or block. hal-
find-by-property searches by property, such as block.is_volume or volume.disc.has_audio.
OPTIONS
The following options are supported:
--capability capability HAL device capability to search for.
--help Display list of options.
--key key The key to the property that is the basis of the search.
--string value The string value associated with the property that is the basis of the search.
--verbose Verbose mode.
--version Display version and exit.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWhalr |
+-----------------------------+-----------------------------+
|Interface Stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
hald(1M), attributes(5), hal(5)
SunOS 5.11 22 Aug 2006 hal-find(1M)