08-24-2011
find takes an argument
-maxdepth. Here is what the manpage says about maxdepth:
Quote:
-maxdepth levels
Descend at most levels (a non-negative integer) levels of directories below the command line arguments. -maxdepth 0
means only apply the tests and actions to the command line arguments.
So, you can use -maxdepth 1 as an additional arg to you find command.
- GP
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Dunno if this has already been discussed but can anyone tell me if there is any utility/command to find a corrupted file in an unix directory.
With smile,
karthik (1 Reply)
Discussion started by: skarthik_d
1 Replies
2. UNIX for Dummies Questions & Answers
I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.
so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies
3. AIX
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies
4. Shell Programming and Scripting
Hi Everybody,
i want a samll help to write a script.
i had source location with :/user/bin (bin contains subdirectories with like names emails etc and had several files in each subdirectory)
and target location with :/usr/scripts (having same subdirectories names and had some files)... (1 Reply)
Discussion started by: Reddy482
1 Replies
5. Shell Programming and Scripting
Hi, I'm trying to write a script that search file in folder.
I got problems with selecting specific file from the list of the files.
when I runing the script I get a list of files instead of one specific file.
I'm new with linux :)
#!/bin/bash
FILE=false
ISFOUND=false
while getopts... (6 Replies)
Discussion started by: SimonBASH
6 Replies
6. Shell Programming and Scripting
Hi, I am using the below command for searching the file
var_SearchFile= find $var_DataSourcePath -name $var_SourceFileName
Output: c:\test\Sample\Testfile.txt
But I need to retrive only the Path that is "c:\test\Sample\" (8 Replies)
Discussion started by: magesh_bala
8 Replies
7. UNIX for Dummies Questions & Answers
hi,
i use command at below to copy the file and put it in the new file (if no such file, it will create right )
cat id_rsa.pub >>~/.ssh/authorized_keys
it give me error
bash: /home/pc2/.ssh/authorized_keys : No such file or directory
can anyone tell me why this happened ? thanks in... (1 Reply)
Discussion started by: Ericyue
1 Replies
8. Shell Programming and Scripting
Hi,
Need your help in this.
I have an input file that has multiple enrollment_number, somewhat like
1234567
8901234
9856321
6732187
7623465
Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies
9. Solaris
Hi,
I am getting below error in Solaris 10 SPARC when trying to issue a search on /var/tmp partition
Below is the query
/bin/find /var/tmp/ -type f -atime +1
Below is the result
/bin/find: stat() error <File> : No such file or directory (28 Replies)
Discussion started by: prash358
28 Replies
10. UNIX for Beginners Questions & Answers
How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on:
$ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print
it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
LEARN ABOUT OSX
pdb_odsam
PDB_ODSAM(8) PDB_ODSAM(8)
NAME
pdb_odsam - Open Directory account information database for smbd
SYNOPSIS
The pdb_odsam plugin is the default account information database backend used on Mac OS X. It makes users and groups record from Open
Directory available to Samba.
idmap_odsam should always be used in conjunction with the odsam passdb backend.
OPTIONS
odsam: map guest to guest = BOOL
If this is true (the default), pdb_odsam map the literal username "guest" to the configured guest account. This makes "guest" an
alias for the configured guest account regardless of whether an account named "guest" exists or not.
odsam: msglevel = LEVEL
LEVEL is the integer log level at which pdb_odsam should emit log messages. The lower LEVEL is, the more verbose the log messages.
odsam: traceall = BOOL
If this is true, pdb_odsam will emit log messages for all Open Directory calls. If it is false (the default), it will only log
errors.
EXAMPLES
[global]
idmap domain = default
idmap config default:default = yes
idmap config default:backend = odsam
idmap alloc backend = odsam
passdb backend = odsam
odsam: msglevel = 0 # Log at debugging levels
odsam: traceall = no # Do not trace Open Directory calls
BUGS
Please report bugs to Apple.
SEE ALSO
DirectoryService(8), smb.conf(5), smbd(8)
PDB_ODSAM(8)