- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- long command lines
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
08-19-2002 09:54 AM
08-19-2002 09:54 AM
Sometimes I have a long command of the form:
ls dirpath ./
and the directory path is long. The next command I give might be of the form:
mv dirpath/file ./
You see, I can get back to the 'ls' command but I need to go to the beginning of the line to change 'ls' to 'mv'. Is there a way to quickly jump from the beginning to the end of a line? Or even to stop at every '/'? I just want to be more efficient, so every little bit counts, and any type of answer will be most appreciated.
By the way, Brant Evans, Bill Hassell, Ian Kidd, Shannon Petry, and Michael Tully, sorry about taking so long to assign points. I'll try not to let it happen again.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2002 09:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2002 09:59 AM
08-19-2002 09:59 AM
Re: long command lines
If you are on vi then $ is end of line ^ is start of line.
if you have emacs as editor then on command line ctrl-a is beginning of line and ctrl-e is end of line
$ and ^ will work on bourne shell too, from command line i.e type command then hit esc (escape) key use $ and ^
Thanks
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2002 10:03 AM
08-19-2002 10:03 AM
Re: long command lines
If you are in vi mode (ksh -o vi), you can repeat the old commands and then move to the last with 'shift+A' command. This is actually append mode from the end of line, but if you press 'esc', then it will return you to the end of line and then use 'vi' commands for manipulation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2002 10:04 AM
08-19-2002 10:04 AM
Re: long command lines
I assume that your shell's editor is set to be 'vi'. Given that, the key sequence "ESC K" will retrieve the last command from the .sh_history file for editting. Then "SHIFT A" will take you to the line's end.
Regards!
...JRF...