Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-22-2009
Registered User
 

Join Date: May 2009
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Copy a command string from the command line

How can we copy a command string from a previous command line and paste it into the cursor position on the current command line? I know that ^c will not work as the shell will interpret as an interrupt signal.

Thanks,
Sponsored Links
  #2  
Old 09-22-2009
thegeek thegeek is offline Forum Advisor  
Registered User
 

Join Date: Apr 2009
Location: /usr/bin/vim
Posts: 870
Thanks: 2
Thanked 10 Times in 8 Posts
1. Use your mouse.

2. Most of the shells supports history, press UP arrow and get the previous command.

3. If you are using bash, you may find this helpful.
15 Examples To Master Linux Command Line History
  #3  
Old 09-23-2009
Registered User
 

Join Date: May 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
This is specific to your terminal emulator. If you are using the Gnome Terminal Emulator, you can use SHIFT+CTRL+C to copy and SHIFT+CTRL+V to paste.

EDIT: As noted above, if you are simply trying to repeat a command, hitting the up arrow key is the best method of doing this.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search for a string and copy the entire line forumthreads UNIX for Dummies Questions & Answers 3 06-29-2009 07:29 AM
Command Line Copy & Paste 1.0 Linux Bot OS X OpenSource RSS 0 01-28-2009 12:30 AM
Command to display nth line before the string is matched. helper UNIX for Advanced & Expert Users 5 11-05-2008 11:08 AM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 06:06 PM
replacing a string in a file with command line parameter chiru_h Shell Programming and Scripting 5 08-03-2006 09:34 AM



All times are GMT -4. The time now is 07:39 AM.