Results 1 to 2 of 2

Thread: UNIX Display or list number of files in a current directory

  1. #1
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    566
    Thanks
    57
    Thanked 41 Times in 38 Posts
    Rep Power
    14

    Default UNIX Display or list number of files in a current directory

    Recently I found a command that displays the Number of files in a ls command listing:
    Code:
    ls -l | wc -l
    Above will find the number of files in a directory, and it will send o/p as pipe to the wc -l, which outputs the number of lines in its input.

    To display all file including hidden and dot files, try
    Code:
    ls -lA | wc -l
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

  2. #2
    Junior Member
    Join Date
    Dec 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    the shortcut to ls command is

    #ll

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display number of processors on linux
    By tom in forum Getting started tutorials
    Replies: 13
    Last Post: 23rd March 2012, 05:34 AM
  2. Script to display number of lines and words from a file
    By newbewie in forum Shell scripting
    Replies: 2
    Last Post: 7th December 2007, 10:37 PM
  3. Replies: 1
    Last Post: 6th March 2007, 12:17 PM
  4. UNIX ls only directories (display only dirs and no files)
    By chiku in forum Solaris/OpenSolaris
    Replies: 1
    Last Post: 21st October 2006, 12:27 AM
  5. How to copy . files from current directory
    By ricc in forum Linux software
    Replies: 1
    Last Post: 10th June 2006, 09:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •