Use keyboard shortcuts at the command line
Takeaway: The bash shell gives you flexibility at the command line for editing. Have a look at these examples.
Delivered each Tuesday, TechRepublic's free Linux NetNote provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!
The bash shell offers a lot of power for interacting with the command line. By default, the shell uses an Emacs-like mode to edit lines, which you can change to a vi-like mode. The mode you choose largely depends on which editor you're most comfortable with.
For example, when using the default Emacs-like mode, you can use a number of [Ctrl] or [Esc] key combinations to navigate and manipulate text when you're working on a lengthy command. Here's a list of some of your options:
You can also use a command to search through your history. Press [Ctrl]R to perform a reverse search through your history for a given command. When you've located the command, press [Enter] to reexecute it, or edit the command to change it.
If you frequently work from the command line, using these shortcuts can save you a lot of time.
SponsoredWhite Papers, Webcasts, and Downloads
- PS Series Groups: Deploying Microsoft SQL Server in an iSCSI SAN Dell EqualLogic
- VoIP Hits the Bull's Eye for Sporting Goods Supplier's Call Center ShoreTel
- Keeping Pace with Expansion through Voice Services ShoreTel
- Live Webcast: The 2008 Email Security Benchmarking Report Google
- IP Telephony Executive Guide 2007 ShoreTel
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET
