Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ls command for listing the number of files Post 302111960 by jimmyc on Friday 23rd of March 2007 02:38:36 PM
Old 03-23-2007
ls command for listing the number of files

I've searched the man page for an option for the ls command to print the number of files in a directory. I'm moving files and folders around and thought a count of files would be a quick way to determine if I was missed one somewhere. Some "unix's" shells do this I think... maybe linux...

Anybody know how to do this real quick

System is: SunOS 5.10 Generic sun4u sparc SUNW,Ultra-5_10 KSH

I did this but is comes back with byte count rather than a file count.
ls -l |wc


Thanks All Smilie)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. Solaris

TAR command , listing backed up files

I've backed up several files to tape using tar, and wish to list those that have backed up. % tar cvf /dev/rmt/2un /s_1/oradata/pgpub/config.ora a /s_1/oradata/pgpub/config.ora 2 tape blocks But when I go to list the files: % tar tvf /dev/rmt/2un tar: tape read error What am I... (3 Replies)
Discussion started by: FredSmith
3 Replies

3. UNIX for Dummies Questions & Answers

unix command to cound the number of files in a folder

Hi All Can some one help me out. Please tell the unix command to cound the number of files in a folder. Ungent please# Thanks manas (6 Replies)
Discussion started by: manas6
6 Replies

4. UNIX for Dummies Questions & Answers

find command -- listing files twice

I noticed the other day that after i used the find command to search for some files, the computer listed them twice -- first with just the names of the files (meaning ./(then the individual file names), then with the directory name, followed by the file names (./directory name/file name). I was... (2 Replies)
Discussion started by: Straitsfan
2 Replies

5. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

6. AIX

command to verify number of files

Guy's I have file system called /appspft has millions of files and I want to know exactly how many file under it Pls advice with that command to verify number of files .. (3 Replies)
Discussion started by: Mr.AIX
3 Replies

7. Solaris

SFTP Command Help - listing files

Ok I am just going to explain what I am running step by step sftp user@hostname sftp > ls < when I run the command "ls" I get a long listing the old version, on the new version I get a short listing how can I change my new version to give me long listing by default (1 Reply)
Discussion started by: slufoot80
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Command for listing files containing one text but not other.

Hi, I want to list all files present in directory those contains one specific word but exclude other. If possible suggest unix commands instead of script to do so. e.g. List all files name from directory which are having "PROMOTION" word but not "LEN_PROMOTION". Thanks (4 Replies)
Discussion started by: gauravgautam135
4 Replies

9. UNIX for Dummies Questions & Answers

Listing only the files under a directory from the result of find command

Hi, I have a main folder 'home'. Lets say there is a folder 'bin' under 'home'. I want to check the list of files under subdirectories present under the /bin directory created in the last 24 hours. I am using the following find command under home/bin directory: find . -mtime -1 -print ... (3 Replies)
Discussion started by: DJose
3 Replies

10. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies
AMMT(8) 						      System Manager's Manual							   AMMT(8)

NAME
ammt - Amanda version of mt SYNOPSIS
ammt [ -d ] [ -f|-t device ] command [ count ] DESCRIPTION
Ammt provides just enough of the standard mt command for the needs of Amanda. This is handy when doing a full restore and the standard mt program has not yet been found. Ammt also provides access to the Amanda output drivers that support various tape simulations. See the amanda(8) man page for more details about Amanda. See the OUTPUT DRIVERS section of amanda(8) for more information on the Amanda output drivers. OPTIONS
-d Turn on debugging output. -f device Access tape device device. If not specified, the TAPE environment variable is used. -t device Same as -f. command count Which command to issue, and an optional count of operations. COMMANDS
Each command may be abbreviated to whatever length makes it unique. eof|weof count Write count (default: 1) end of file marks (tapemarks). fsf count Skip forward count (default: 1) files. bsf count Skip backward count (default: 1) files. asf count Position to file number count (default: 0) where zero is beginning of tape. This is the same as a rewind followed by a fsf count. rewind Rewind to beginning of tape. offline|rewoffl Rewind to beginning of tape and unload the tape from the drive. status Report status information about the drive. Which data reported, and what it means, depends on the underlying operating system, and may include: ONLINE Indicates the drive is online and ready. OFFLINE Indicates the drive is offline or not ready. BOT Indicates the drive is at beginning of tape. EOT Indicates the drive is at end of tape. PROTECTED Indicates the tape is write protected. ds Device status. er Error register. fileno Current tape file number. blkno Current tape block number file. NOTE: many systems only report good data when a tape is in the drive and ready. AUTHOR
Marc Mengel <mengel@fnal.gov> John R. Jackson <jrj@purdue.edu> SEE ALSO
amanda(8) AMMT(8)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy