Results 1 to 2 of 2

Thread: How to list the top / first 100 files or directories of any directory in Linux?

  1. #1
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183

    How to list the top / first 100 files or directories of any directory in Linux?

    So you want to display the first 100 files or directories of the current directory or any directory of your choice in Linux.

    To list the first 100 files or directories of the current directory, simply use:

    Code:
    ls | head -101
    To list the first 100 files or directories of the directory 'photos', use:

    Code:
    ls photos | head -101
    The road goes ever on and on.

  2. #2
    Very nice command really.Thanks for this useful command.

Posting Permissions

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