Cli question

Chat about anything related to Linux Mint

Cli question

Postby NiksaVel on Fri Mar 16, 2007 9:11 am

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?
User avatar
NiksaVel
Level 5
Level 5
 
Posts: 806
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia

Linux Mint is funded by ads and donations.
 

Postby clem on Fri Mar 16, 2007 10:20 am

yourcommand | more
User avatar
clem
Level 15
Level 15
 
Posts: 5580
Joined: Wed Nov 15, 2006 8:34 am

Postby scorp123 on Fri Mar 16, 2007 10:34 am

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-- 

...
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby NiksaVel on Fri Mar 16, 2007 11:17 am

thanks guys :)
User avatar
NiksaVel
Level 5
Level 5
 
Posts: 806
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia


Return to Chat about Linux Mint

Who is online

Users browsing this forum: No registered users and 5 guests