Hello,
I am new to unix and would like to have a count of all the files in the current directory as well as all the files in a subdirectory.
The command I used was ls -R | wc -l
but the number returned wasn't correct. Can someone please help?
Thanks (2 Replies)
I need to find the largest files in a directory & it's subdirectories.
I'm not sure what options on ls -l will work to give me this. or is there another way to do this?
Thanks,
igidttam (6 Replies)
Hi guys,
I am searching some files not equal to the pattern with this command
find ! -name "PATTERN" -type f
but my problem is the find command because he also search inside subdirectories and that's the thing i don't want that.
Is there any comand to ignore the directories... (4 Replies)
Hi
I have a directory with two subdirectories and also have a code like below to search files modified in last 2 minutes.
# ls
hello080909.txt inbox outbox
# find . -type f -mmin +2
./inbox/hello2080909.txt
./outbox/hi0080909.txt
./hello080909.txt
The above code just searches and... (3 Replies)
Hi there,
I'm new to shell scripting...
I've a situation like to find *.tar files under all subdirectories in "/home/abcd" and i used the below,
find /opt/lhapp ! -name "temp" | more
the above works fine.. Now don't need search few direcotries like "/home/abcd/aaaa",... (15 Replies)
Hi all...
I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files.
What I want to know is:
How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Hi,
I have a large number of subdirectories (>200), and in each of these directories there is a file with a name like "opp1234.dat".
I'd like to know how I could change the names of these files to say "out.dat" in all these subdirectories in one go.
Thanks! (5 Replies)
I have a folder named test/ and under that I have multiple directories and in each of the directory I have multiple log files. I want to know how many files exists under each sub directory.
test
|--quanrantine
|--logfile1
|--logfile2
|--spooling
|--logfile1
... (4 Replies)
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
LEARN ABOUT OPENSOLARIS
ttysrch
ttysrch(4) File Formats ttysrch(4)NAME
ttysrch - directory search list for ttyname
DESCRIPTION
ttysrch is an optional file that is used by the ttyname library routine. This file contains the names of directories in /dev that contain
terminal and terminal-related device files. The purpose of this file is to improve the performance of ttyname by indicating which subdirec-
tories in /dev contain terminal-related device files and should be searched first. These subdirectory names must appear on separate lines
and must begin with /dev. Those path names that do not begin with /dev will be ignored and a warning will be sent to the console. Blank
lines (lines containing only white space) and lines beginning with the comment character "#" will be ignored. For each file listed (except
for the special entry /dev), ttyname will recursively search through subdirectories looking for a match. If /dev appears in the ttysrch
file, the /dev directory itself will be searched but there will not be a recursive search through its subdirectories.
When ttyname searches through the device files, it tries to find a file whose major/minor device number, file system identifier, and inode
number match that of the file descriptor it was given as an argument. If a match is not found, it will settle for a match of just
major/minor device and file system identifier, if one can be found. However, if the file descriptor is associated with a cloned device,
this algorithm does not work efficiently because the inode number of the device file associated with a clonable device will never match
the inode number of the file descriptor that was returned by the open of that clonable device. To help with these situations, entries can
be put into the /etc/ttysrch file to improve performance when cloned devices are used as terminals on a system (for example, for remote
login). However, this is only useful if the minor devices related to a cloned device are put into a subdirectory. (It is important to note
that device files need not exist for cloned devices and if that is the case, ttyname will eventually fail.) An optional second field is
used in the /etc/ttysrch file to indicate the matching criteria. This field is separated by white space (any combination of blanks or
tabs). The letter M means major/minor device number, F means file system identifier, and I means inode number. If this field is not speci-
fied for an entry, the default is MFI which means try to match on all three. For cloned devices the field should be MF, which indicates
that it is not necessary to match on the inode number.
Without the /etc/ttysrch file, ttyname will search the /dev directory by first looking in the directories /dev/term, /dev/pts, and /dev/xt.
If a system has terminal devices installed in directories other than these, it may help performance if the ttysrch file is created and con-
tains that list of directories.
EXAMPLES
Example 1 A sample display of /etc/ttysrch command.
A sample /etc/ttysrch file follows:
/dev/term MFI
/dev/pts MFI
/dev/xt MFI
/dev/slan MF
This file tells ttyname that it should first search through those directories listed and that when searching through the /dev/slan direc-
tory, if a file is encountered whose major/minor devices and file system identifier match that of the file descriptor argument to ttyname,
this device name should be considered a match.
FILES
/etc/ttysrch
SEE ALSO ttyname(3C)SunOS 5.11 23 Feb 1994 ttysrch(4)