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
DBVIEW(1)							Database Management							 DBVIEW(1)

NAME
dbview - View dBase III files SYNOPSIS
dbview [-b|--browse] [-d delim| --delimiter delim] [-D|--deleted] [-e|--description] [-h|--help] [-i|--info] [-o|--omit] [-v|--version] [-r|--reserve] [-t|--trim] dbfile DESCRIPTION
Dbview is a little tool that will display dBase III files. You can also use it to convert your old .dbf files for further use with Unix. It should also work with dBase IV files, but this is mostly untested. By default dbview displays the contents of a dBase III or IV database file. This is be done by displaying both the name of the field itself and its value. At the end of every record a newline is appended. OPTIONS
If no option given dbview only displays the database in its most friendly way. --browse, -b switches into browse mode. Using this mode no fieldnames will be displayed, instead every record will displayed in one line using a delimiter to separate fields. --delimiter, -d delimiter The default delimiter in browse mode is the colon sign ``:''. This parameter overrides it. This can be useful especially if you plan to examine the output with scripts. --deleted, -D displays deleted records as well as the delete state in each record in the database. --description, -e displays the field description of the database. --help, -h displays a complete (or short) help screen. --info, -i displays some (partially technical) information about the database like number of records and length of each record. --omit, -o omits displaying the whole database. Using this parameter can be useful if you're only interested in the structure. --reserve, -r Normally fieldnames are converted into a more friendly format. They are stored in capital letters, but that looks like shouting. This parameter supresses the conversion. --trim, -t When this option is specified, leading and trailing spaces are omitted. This might be useful when in browse mode. --version, -v displays version and exits. NOTES
As dBase is DOS, umlauts are stored using a different code table (namely ASCII) than most modern unices (namely ANSI). If you encounter such a file, I would recommend piping the output through recode(1) with ibmpc:latin1 as it's argument. If you want to examine the output generated by the browse mode, just take cut(1) and set its delimiter to the used delimiter or take awk(1) and continue. COPYRIGHT
Dbview is free software. It is based on routines from unknown source that I found on nic.funet.fi in /pub/msdos/languages/c as dbase.c. The file contained the following notice: These functions are provided by Valour Software as a gift. I have modified and included this file and wrote a skeleton around it. All together provides a powerful tool for dBase III and IV database manipulation under Unix. I mainly have written this program, because I've got several dbase files containing important information for me. As I won't go running DOS everytime I need some of the stored information, I had to find a viewer that runs unter Unix, resp. Linux, but unfortunately didn't find one. So it was my turn. This package as a whole is published under the GNU Public License, which is a great invention. It wasn't the intention to write a freaking viewer and reinvent the wheel again. Instead dbview is intend to be used in conjunction with your favourite unix text utilities like cut, recode and more. Martin Schulze Infodrom Oldenburg joey@infodrom.north.de SEE ALSO
recode(1), more(1), awk(1), cut(1). Unix November 20th, 2006 DBVIEW(1)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy