Find the answer to your Linux question:
Results 1 to 3 of 3
I am trying to count how many files and folders in a directory using the ls command. How would I accomplish this? wc? what does the command look like?...
  1. #1
    Banned
    Join Date
    Apr 2009
    Posts
    10

    [SOLVED] simple count command

    I am trying to count how many files and folders in a directory using the ls command.

    How would I accomplish this? wc? what does the command look like?

  2. #2
    Banned
    Join Date
    Apr 2009
    Posts
    10
    I type

    Code:
    ls | wc
    and nothing happens

  3. #3
    Banned
    Join Date
    Apr 2009
    Posts
    10
    never mind I got it.

    ls -1 | wc -l

Posting Permissions

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