"ls command for listing the number of files"

Post #302111992 by ghostdog74 on Friday 23rd of March 2007 08:44:13 PM

one little minor problem, at least what i have encountered, is that ls -l list out the files, including the "total" line on the very first line. wc -l will count that line too. So its just sufficient to exclude the switch , or use ls -1 instead.
UNIX and Linux Facts

Unix (trademarked as the UNIX certification mark) is a very mature family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix. Unix development starting in the 1970s by legendary Bell Labs programmers Ken Thompson, Dennis Ritchie, and others. Unix was first targetted for the Bell System and AT&T licensed Unix to outside parties. In the 1970s time period, this lead to a variety of for-profit as well as not-for-profit Unix variants. In the early days, this included the University of California, Berkeley (BSD), Microsoft (Xenix), IBM (AIX), and Sun Microsystems (Solaris). In the early 1990s AT&T sold their Unix rights to Novell. In 1995 Novell sold their Unix business to the Santa Cruz Operation (SCO). The UNIX trademark was passed to The Open Group, a "neutral" industry consortium. The Open Group promoted the use of the UNIX trademark for certified operating systems that comply with the Single UNIX Specification (SUS). In 2014 Apple's macOS became the Unix version with the largest global install base and macOS remains the largest Unix-user base today.
Linux is a family of open source Unix-like operating systems based on the Linux kernel. The Linux kernal is an operating system kernel first released by Linus Torvalds on 17 September 1991. Linux distributions include the Linux kernel, system software and libraries. Popular Linux distributions include Debian, Fedora, and Ubuntu. Commercial Linux distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise Server. Linux is freely redistributable. Anyone may create a Linux distribution for any purpose.
Related Linux and UNIX Technical Support
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...... Solaris
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...... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
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... Solaris
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... UNIX for Dummies Questions & Answers
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 ...... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers