- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Filename Completion and History
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 08:32 AM
03-10-2004 08:32 AM
I am using RedHat Enterprise Linux Version 2.1. Can someone answer the following questions?
1. Which shell is recommended for Sys Admin tasks? What is the Posix or Korn shell equivalents in Linux?
2. In the recommended shell, how can I setup filename completion and command line editing?
Thanks to all replies,
S. Selva
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 08:41 AM
03-10-2004 08:41 AM
Re: Filename Completion and History
bash.
/bin/bash (usually) is a bourne shell replacement with many many added features like filename completion (this is the default).
bash supports vi-style editing ala ksh as well (bash -o vi)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 10:18 AM
03-10-2004 10:18 AM
Re: Filename Completion and History
I'd agree with Paul though, as 'bash' (the standard on most (if not all) Linux systems) is probably your best bet.
It comes started with file completion, and also a command history (usually stored in ~/.bash_history ($HISTFILE)) of configurable length ($HISTFILESIZE and $HISTSIZE).
The history navigation and inline editing are variable, and can be changed to use your favourite editor styled commands (set -o vi, set -o emacs), with or without arrow-key support.
As for ksh equivlants, you've got 'pdksh', as well as the standard posix 'ksh' source available to download and compile. Most linux distributions have a 'pdksh' package available, but due to the licencing, you'll need to get the posix ksh source yourslef.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 01:49 AM
03-11-2004 01:49 AM
Re: Filename Completion and History
However I am still unable to do filename completion by hitting the ESC key twice.
How can I get that done?
-Suren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 02:05 AM
03-11-2004 02:05 AM
Re: Filename Completion and History
or esc-k, esc-m, as in vi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 02:51 AM
03-11-2004 02:51 AM
Re: Filename Completion and History
How can filename completion be done?
-Suren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 04:15 AM
03-11-2004 04:15 AM
Re: Filename Completion and History
As Paul indicated, under bash, just enter the leading part of a file name path and hit the TAB key... just as you would do under ksh with the ESC key.
-Jared
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 05:16 AM
03-11-2004 05:16 AM
SolutionFor example, type "whic" and then the TAB key. It will immediately be completed to "which". However, if you type "wh" you have to press the TAB key twice to get a full list of all the files that could match.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 05:42 AM
03-11-2004 05:42 AM
Re: Filename Completion and History
-Suren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 08:40 AM
03-11-2004 08:40 AM
Re: Filename Completion and History
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 09:48 AM
03-11-2004 09:48 AM
Re: Filename Completion and History
If you want completion by pressing escape twice, you can install pdksh. Then use "set -o vi" to enable vi like command line editing and "set -o vi-esccomplete" to enable the double escape completion.
--
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 10:28 AM
03-11-2004 10:28 AM
Re: Filename Completion and History
To do partial-name-listings however, it seems you have to press escape 5 times instead of four.. but that's in 'set -o emacs'.
As you're in 'set -o vi', you should be using the ksh/vi key equivalents, ESC+\ (for completion) and ESC+* (for all matches).