Linux.com

Home Learn Linux Linux Answers Desktop Can you pause the ls command?
Answers
  • ls | less
    That will allow to scroll up and down the list.
    I do hope that helps.

    Answered by chuzzle44
    2 years ago
    0 2
  • You can simply type ls | more

    Answered by leozeppelin
    2 years ago
    0 1
  • To view long output from utilities like ls, you must pipe the output into a pager, such as more, less, or most: `ls | less`. The "|" (pipe) sends, or pipes, standard output from the command on the left (ls) into the standard input of the command on the right (less). Press the spacebar to advance the output of the pager. Press the "q" key to quit the pager. Try `man less` for more information.

    Answered by hashstat
    2 years ago
    0 2
  • use the more command like: ls -l | more (pipe sign)
    or u can scroll the output both up and down one line at a time, try this command: ls -l | less (here ctrl+c does not work, while u have to press q to exit)

    Answered by rechil_colin
    2 years ago
    0 1
  • ls | more

    Answered by aziztsaqieb
    2 years ago
    0 1
  • For this you use the "less" o "more" command and you connect them with the pipe character "|" so the command should be "ls | less" or "ls | more" for me, "less" is better.

    Answered by raluxs
    2 years ago
    0 1
  • ls | more

    Answered by srinivas_b
    2 years ago
    0 1
  • Pipe the output of ls command to more command. So it should look like this ls | more. Say, if you're trying to see what's inside /home/user/Documents you can type ls /home/user/Documents | more. This will let you see the contents of Documents page by page, or line by line.

    Answered by sevv
    2 years ago
    0 1
  • You can't pause it per say, however, you can pipe it through more/less

    Generally, I'll do a "ls | less"
    This will allow you to essentially "pause" the output, scroll through it, and even perform a search if necessary.

    Hope that helps!

    Answered by frdprefct
    2 years ago
    0 0
  • Add "|more" at end (without quotes)

    Answered by emsteroid
    2 years ago
    0 0
  • try this "ls -l |more"

    Answered by freex
    2 years ago
    0 0
  • Hey Charles,
    You can certainly "pause" the ls command. All you have to do is use ls in conjunction with the less command. So for example you'd type "ls | less" without the quotes. Also to create the | symbol (pipe) just hold shift and hit the key above enter. You can also look at my site for a little more information about ls and various other commands. www.cmdlist.com

    Hope this helps,
    Adam

    Answered by adamballa
    2 years ago
    0 0
  • ls | more

    Answered by christer
    2 years ago
    0 0
  • In the command prompt type:

    #ls | less

    This will force ls to list content one screen-section at a time.

    Answered by saqman2060
    2 years ago
    0 0
  • Try this:

    ls | less

    Answered by BrianK
    2 years ago
    0 0
  • ls -l | more

    Answered by jbloink
    2 years ago
    0 0
  • Pipe the output through a pager. If you have the PAGER variable defined, use:

    ls | "$PAGER"

    If not, use either less or more:
    ls | more
    ls | less

    Answered by cfajohnson
    2 years ago
    0 0
  • Why not just scroll up and down with: SHIFT + PgUP/pgDOWN ?

    You could redirect the output to a file as well:
    ls > output_file

    Answered by marc
    2 years ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Desktop

Upcoming Linux Foundation Courses

  1. LFD320 Linux Kernel Internals and Debugging
    04 Aug » 08 Aug - Virtual
    Details
  2. LFD405 Embedded Linux Development with Yocto Project
    04 Aug » 07 Aug - Santa Clara, CA
    Details
  3. LFD312 Developing Applications For Linux
    18 Aug » 22 Aug - Virtual
    Details

View All Upcoming Courses

Community Answers - Search


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board