Find the answer to your Linux question:
Results 1 to 2 of 2
Hello everyone. How is it possible to find which .dat file in the /home/guest directory has the most lines in only one shell command? Thank you very much...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    1

    Question Terminal Command: Find the file with most lines


    Hello everyone.


    How is it possible to find which .dat file in the /home/guest directory has the most lines in only one shell command?

    Thank you very much

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    675
    Is this a home work question?

    Hints:
    How do you get a line count for one or more files?
    How would you sort the returned data?
    How would you take the line out of that data?
    It would seem that pipes would be involved.

    A single shell command is not executing one application, but a mini-script.

Posting Permissions

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