LWN.net Logo

Just use the shell

Just use the shell

Posted Dec 20, 2006 14:10 UTC (Wed) by Richard_J_Neill (subscriber, #23093)
Parent article: A survey of Linux file managers (Linux.com)

It's much faster to use the shell, especially if:

* You know the readline shortcuts (Ctrl-A,E, Alt-F,B etc).

* You use the qmv and imv utilities for mass renaming of files.

* You have a "move to trashcan command" (I alias this as 'cn')

* You have the newer bash-completion enabled

* You have inputrc with:
set show-all-if-ambiguous on
which makes tab-completion so much more helpful.

* You use konsole with tabs, and name the tabs automatically: .bashrc:
if test "$DISPLAY"; then
if [ "$DISPLAY" == ":0" -o "$DISPLAY" == ":0.0" ];then
export PS1=$PS1"\[\e]30;\W/ \a\]\[\e]0;\a\]"
else
export PS1=$PS1"\[\e]30;\h:\W/ \a\]\[\e]0;\a\]"
fi
fi

* You are aware of zcat, strings, file, and the fact that less can cope
automatically with .ps, .pdf and .rpm files (they get viewed as text)

* You might, or might not wish to alias mv/cp/rm to "mv -i" etc.

Hope some of that is useful.


(Log in to post comments)

Just use the shell

Posted Dec 20, 2006 14:20 UTC (Wed) by nix (subscriber, #2304) [Link]

Oddly, the readline shortcuts you didn't mention (forward-search-history and reverse-search-history, the history isearchers) are by *far* the most useful.

(The automatic tab naming stuff is damn useful. Thanks!)

Oh, and less can cope with random binaries, tar, rpm, gzip, and much else if you use the lessopen.sh script. (Myself I use a hacked copy that runs eu-readelf on binaries and nm -D on shared libraries, but that's just me.)

Just use the shell

Posted Dec 20, 2006 17:46 UTC (Wed) by Arker (guest, #14205) [Link]

One nice thing about OFMs is that you have a full-featured command line integrated, and anything easier done that way can be done that way, without breaking the flow in any way.

Terminal window escapes

Posted Dec 22, 2006 2:36 UTC (Fri) by ldo (subscriber, #40946) [Link]

Hey, cool, thanks for that.

However, I don't understand your use of "\e]30;" instead of "\e]2;". The latter sequence is documented in the console_codes(4) man page as setting the terminal window title, while the former is not mentioned. You talk about using Konsole with tabs, but this is not a requirement, since Konsole automatically recognizes the set-window-title sequence as only applying to the current tab if you have multiple tabs.

For everybody's reference, the full set of sequences you can put in a Bash prompt is listed here.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds