Solved

linux Oracle VM can't see full output from commands such as ls

Posted on 2009-07-12
3
347 Views
Last Modified: 2013-11-11
Hello,

I'm using I believe the JetOS version of linux. It's Oracle VM.

It's all command line.

When I do for example any command that lists results:

ls
ls -ltr
cat

I can only see the end of the results on the screen.

In other words, I can't scroll up to see all the results.

Is there some kind of paging parameter I can use to see just a section of the results at a time and hit enter
and then go down a few lines see the next results etc?




0
Comment
Question by:ora-what
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 24836029
You can pipe the output through a pager such as "less". When using ls (i.e. without -l) you want to format by rows instead of columns using "ls -x". Personally I like to also use the -F option of ls, to show which entries are directories, executables and so on.
Instead of using "cat", use "less" directly.

Have you tried Shift-Page_up and Shift-Page_down? These normally give a degree of scrolling on text-only systems if you are actually at the console, may not necessarily work in a VM
ls -Fx | less
less afile
ls -Fltr | less
ls -Flt | less

Open in new window

0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 24836345
Actually "ls" is a bit more awkward to paginate than most commands because it behaves differently when stdout is a pipe. See below (lines starting # are comments)
# First determine the width of your screen
07:35:12$ stty size
25 80
 
# The second number is the width. Give this to ls (only seems to work if you also give -x)
09:06:58$ ls -xw80|less
Account.cpp               Account.cpp.bu    Account.h
Account.h.bu              Bordered$1.class  Bordered.class
Bordered.java             Bounds$1.class    Bounds$BoxedLabel.class
Bounds.class              Bounds.java       EtherLinkXL.c
 
# (further output suppressed)
# ls -Fxw80|less also works

Open in new window

0
 

Author Closing Comment

by:ora-what
ID: 31602585
the Shift + Pageup and Shift+Page down did it

thanks a million !

also very informative and educational
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 65
centos linux 65 159
Windows Server Backup - listing of files that were backed up 26 105
aes256 Ransomware on SBS 2011 13 37
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question