Page 1 of 1
Cli question
Posted: Fri Mar 16, 2007 9:11 am
by NiksaVel
ahem... for a linux noob:
Is there a way to scroll along the lines in CLI? I.e. when I look at help for some command it instantly scrolls a few screens of text, and I naturally see only the last one...
or an option to force it to display page by page?
Posted: Fri Mar 16, 2007 10:20 am
by clem
yourcommand | more
Posted: Fri Mar 16, 2007 10:34 am
by scorp123
But beware ... on most keyboards there are two such similar symbols. On my swiss keyboard I have one on the "1" key: | .. and another one on the "7" key: ¦ .... the one on the "1" key would be the right one in my case.
While they might look the same they function differently (the wrong one doesn't work at all in UNIX-ish OS). You have to find out which one works. The one giving error messages like this is probably the wrong one:
Code: Select all
ps -efH ¦ more
ERROR: Garbage option.
ls -al ¦ more
ls: cannot access ¦: No such file or directory
ls: cannot access more: No such file or directory
Correctly it should look something like this:
Code: Select all
/usr/src/linux> ls -al | more
total 16116
drwxr-xr-x 21 root root 4096 2007-03-09 21:55 .
drwxr-xr-x 6 root root 4096 2007-03-09 21:10 ..
drwxr-xr-x 26 root root 4096 2007-03-09 21:01 arch
drwxr-xr-x 2 root root 4096 2007-03-09 21:27 block
-rw-r--r-- 1 root root 72799 2007-03-09 21:19 .config
-rw-r--r-- 1 root root 72781 2007-03-09 21:19 .config.old
-rw-r--r-- 1 root root 72721 2007-03-09 21:19 .config.running
-rw-r--r-- 1 root root 18693 2006-09-20 05:42 COPYING
-rw-r--r-- 1 root root 89517 2006-09-20 05:42 CREDITS
drwxr-xr-x 2 root root 12288 2007-03-09 21:55 crypto
drwxr-xr-x 60 root root 12288 2007-03-09 21:01 Documentation
drwxr-xr-x 63 root root 4096 2007-03-09 21:46 drivers
drwxr-xr-x 58 root root 12288 2007-03-09 21:58 fs
-rw-r--r-- 1 root root 542 2006-09-20 05:42 .gitignore
drwxr-xr-x 42 root root 4096 2007-03-09 21:19 include
drwxr-xr-x 2 root root 4096 2007-03-09 21:55 init
drwxr-xr-x 2 root root 4096 2007-03-09 21:27 ipc
-rw-r--r-- 1 root root 1198 2007-03-06 16:40 Kbuild
drwxr-xr-x 3 root root 4096 2007-03-09 21:01 kdb
drwxr-xr-x 5 root root 12288 2007-03-09 21:58 kernel
drwxr-xr-x 5 root root 12288 2007-03-09 21:58 lib
-rw-r--r-- 1 root root 5 2007-03-06 16:40 localversion-rpm-release
-rw-r--r-- 1 root root 72925 2006-09-20 05:42 MAINTAINERS
--More--
...
Posted: Fri Mar 16, 2007 11:17 am
by NiksaVel
thanks guys