Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ls command help, figures not matching up Post 302088487 by jopper on Tuesday 12th of September 2006 06:11:49 PM
Old 09-12-2006
ls command help, figures not matching up

Hello all.

I ran my AV app. and it scanned 600k+ files on my osx tiger powerpc laptop.
I went into terminal and ran ls -l */* on my applications folder.

for one entry it returned:

Snood3.0/:
total 17376
-rwxrwxrwx 1 ds admin 5152 Jan 17 2006 License30.txt
-rwxrwxrwx 1 ds admin 226101 Jan 17 2006 Snood
-rwxrwxrwx 1 ds admin 15053 Jan 17 2006 Snood 3.0 ReadMe (text).txt
-rwxrwxrwx 1 ds admin 18429 Jan 17 2006 Snood 3.0 ReadMe.rtf
-rw-r--r-- 1 ds admin 352 Jan 18 2006 serial.rtf

I ran ls -l on its parent folder and got this result
drwxrwxrwx 8 ds admin 272 Jan 18 2006 Snood3.0
it shows 8 for the directories. There are 5 files + . & .. = 7 not 8?

1. What constitutes the "8" number if the total "directories" add up to 7?
2. What does the figure "total x" represent, in this case total 17376?
3. As stated above my computer has over 600k files. I'd like to identify which folders/apps contain the most files so I can trim this figure down. Is there a command to list all files of such folder? If in fact the above example includes 17k+ files and I only see 5 I'd like to be able discern the discrepancy between the two.

Thanks for any help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Matching a choice of character in test command

Hi ] && exit 0 Although it, the $answer, is 'y', the test operation returns true. && exit 0 This works but I want to do multiple choice matching. I don't want to do like: Please help (2 Replies)
Discussion started by: lalelle
2 Replies

2. Shell Programming and Scripting

How to from grep command from a file which contains matching words?

Hi all I have a file with below content (content is variable whenever new product is launched). I need form a grep command like this egrep "Unknown product|Invalid symboland so on" How to do it using a script? Unknown product Invalid symbol No ILX exch found exceeds maximum size AFX... (4 Replies)
Discussion started by: johnl
4 Replies

3. AIX

matching pattern in 'ps' command

Hi all, I have two instance of jboss (jboss and jboss2). In a shell script that I am writing, I need to grep for each instance of jboss. If i use ps -ef|grep 'jboss', it will also return the process for my second instance of jboss, which is jboss2. Can someone tell me how can i specify the... (1 Reply)
Discussion started by: haroon_a
1 Replies

4. AIX

Matching command scroll - ksh

In ksh is there a was to scroll thru all matching commands? For example I executed several commands over several days. Is there a way to scroll thru all the matching 'find' commands only that was executed? No messing with the .history file. Anyway to do this from the command prompt? TIA. (3 Replies)
Discussion started by: Un1xNewb1e
3 Replies

5. Shell Programming and Scripting

Hex to decimal - Execute command for the matching part

Alo I have this input: 0x10=some text 0x20=some text 0x30=some text and want this output: 16=some text 32=some text 48=some text I want to use a command to convert from hex to decimal i.e.: $ echo $((0x15a)) or $ printf '%d\n' 0x15a I try to use something like this: sed... (5 Replies)
Discussion started by: chitech
5 Replies

6. Shell Programming and Scripting

Understanding pattern matching used in a grep command

I have the following code. I want to remove the --sort=num/num/... and am using grep to exclude it as shown below: I have a bit of problem figuring out the use of - at the front echo "--sort=4/5/6" | grep -ivE '-((sort|group)=+/+(/+)*)$' Now suppose I want to remove --quiet I can... (7 Replies)
Discussion started by: kristinu
7 Replies

7. Shell Programming and Scripting

Significant Figures in awk

Hello, I've had a look at the printf modifiers, but so far I haven't had much luck in making it do what I need. I need to make it output with a set number of characters every time: whether it's by adding zeros at the end or by rounding, the output has to have the same number of characters in it,... (2 Replies)
Discussion started by: Leo_Boon
2 Replies

8. UNIX for Dummies Questions & Answers

find command: names matching the expression

Hello all, I need to print directories using find command. The directories names contain date in the format YYYYMMDD or the name of directory is only the date format. I want print directories, which doesn't start with this date. E.g I have dirs like foo20120101 foo20120101foo 20120101foo... (1 Reply)
Discussion started by: satin1321
1 Replies

9. Shell Programming and Scripting

UNIX command to get the latest file and also matching pattern

we want to fetch the latest file in a given directory and also the file name should match the below pattern Example file name ->hrdata-2015-10-13-16-45-26.xml(2015-10-13-16-45-26- it is not current timestamp, we just need to check for the pattern) We expect the file will have the... (3 Replies)
Discussion started by: vishwanath001
3 Replies

10. Shell Programming and Scripting

Expect pattern matching in the command output

This is the command output need to be matched: Telnet console listening to port 42365. (the port number changes every time) Code to test it: ======================================= #!/tools/AGRtools/bin/expect exp_internal 1 set timeout 10 spawn bash set bashId $spawn_id ... (4 Replies)
Discussion started by: marsala
4 Replies
FcFontSort(3)															     FcFontSort(3)

NAME
FcFontSort - Return list of matching fonts SYNOPSIS
cc [ flag... ] file... -lfontconfig [ library... ] #include <fontconfig.h> FcFontSet * FcFontSort (FcConfig *config, FcPattern *p, FcBool trim, FcCharSet **csp, FcResult *result); DESCRIPTION
Returns the list of fonts sorted by closeness to p. If trim is FcTrue, elements in the list which don't include Unicode coverage not pro- vided by earlier elements in the list are elided. The union of Unicode coverage of all of the fonts is returned in csp, if csp is not NULL. This function should be called only after FcConfigSubstitute and FcDefaultSubstitute have been called for p; otherwise the results will not be correct. The returned FcFontSet references FcPattern structures which may be shared by the return value from multiple FcFontSort calls, applications must not modify these patterns. Instead, they should be passed, along with p to FcFontRenderPrepare which combines them into a complete pattern. The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy. VERSION
Fontconfig version 2.5.0 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfontconfig | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ |MT-Level |See XInitThreads(3X11) | +-----------------------------+-----------------------------+ 13 November 2007 FcFontSort(3)
All times are GMT -4. The time now is 10:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy