Copying and pasting text from windows to a remote linux file [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have an amazon ec2 instance hosting ubuntu 14.04. I need to copy a paste a win 7 textfile on my local machine, into a textfile on ec2. Is there a text editor that would support cutting and pasting available in ubuntu 14.04 or what is the best way to cut and paste info into a linux file . I created the file on amazon using
$ vim text1.txt

Cut and paste are an operation on the local operating system so your remote linux box is not going to support it directly.
That said, your terminal emulation will accept a paste operation (usually with Shift-Insert on Windows if I recall), so you can just go into insert mode in vi and paste - the characters just get inserted as if you had typed them all.
The suggestion to use cat > filename also works but I have found that some terminal emulations will hang when pasting large chunks to the command line where stuffing them into vi has worked fine.

Related

Terminal output to a file using > [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm a beginner with bash/linux. I have a program that I have written using Visual Code Studio. I have been able to correctly compile the program and it return the output I was expecting. But I have forgotten the command to take that output and put it into a specific file.
Also, how would I find the pathway for that file, if it's not physically on my computer? I've ssh into a rasp pi on campus. So all the files are on the pi. Could it be as simple as copy paste?
I really think you should go over the basics of remote connection to a Linux machine, but to answer your question:
In order to redirect output from a command line utility (i.e. your program):
./[program_name] &> [output file]
using the &> operator will redirect both stdout and stderr to that file which I assume you want
In order to pull that file from remote:
scp [username]#[server_ip]:/[output file] ./
This assumes you actually have a user on that remote machine that you can ssh into

copy entire file to clipboard (but not default, +, or * registry) in Linux xterm [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am trying to copy 13,000 lines of code from a file on a remote computer to a text file on my own computer but am having no luck. I am working on a Linux virtual box and am ssh'd into another computer where the file is. If I highlight with my mouse and type control shift C, then it works, but I can't highlight anything other than what's currently visible in the window. Using g g " + y G or " + y (in vi) doesn't work because the + (or *) registry doesn't transfer between the remote system and mine (using Visual select and then control Shift C doesn't seem to work either). Does anyone know how to select more than just the visible window so I don't have to copy paste hundreds of times to get the whole file?
you can copy the whole file using this code:
scp username#remote:/path/to/file /local/path/to/destination
Note : here your destination is where you are logged in (local computer)

How to open applications after booting a purely Command line interface of Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
After booting linux in purly command line mode how can I open an application eg web browser or Libra Office?
For example if I use the command "play" with any audio file it starts to play it. I want to know commands for other applications
You have to start an X Window session before you can open those applications because they depend on it to render the GUI. To do this you can use the startx command.
There is a good description here on how to use startx.
However, doing it this way can be a lot of manual and tedious work. That's why most linux distros have packaged full window managers like Gnome, Xcfe, etc for you to install with a single command. If what you really want is a minimal one you might look at Fluxbox or Openbox. You can learn a lot about the guts of X by installing and configuring them on your own.
I suspect what you may really need is just to edit text files and get resources from the internet while logged into a Linux box that is command line only. If so, you can check out these command line only tools.
Lynx command line browser
WGet internet file retriever
EMacs text editor
Vim text editor

Setting clipboard options from the vim console [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm trying to use vim on a remote Ubuntu server and I'm noticing that the start up for vim is too slow unless I use the -X flag or have set clipboard=exclude:.* in my .vimrc.
When I use either options, vim starts up fast but the problem is I can't copy from vim to the system clipboard. I've tried numerous times to do :set clipboard=unnamed and the like from the console but it won't register anything because it seems to only connect to the x server if that line is in .vimrc.
How can I start vim with the -X option but start the x server afterwards (only if I need to copy stuff)? Or how can I change clipboard settings from within the console?
If you have to start Vim with -X, I don't think there's a way to later enable clipboard support. You either have to find and fix the root cause for the slowness of connecting to X, or work around this with external tools, e.g.
:3,5w !xsel --clipboard
or
:3,5w !xclip -in -selection clipboard

Install two ceentOS on the same harddrive [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I want to install two centOS V6.2 on the same Hardidsk but on different partition. After installing on different different partition, at the time of booting it shows only centOS which is installed at last.
Can some help me to install two centOS on the same Harddrive.
I assume that you are using GRUB. Bootup with whatever CentOS that boots up. Open the grub.conf file (normally under /boot/grub). Find the kernel and initramfs of the other installation of CentOS.(usually under /boot)
Copy the title, root, kernel and initrd lines in grub.conf file, and paste those lines after the existing ones. Make changes to the newly pasted lines. Change the title to reflect the text in the new menu. Change root to the / of the other installation partition in GRUB terms. Change the kernel and initrd params to reflect the location of other kernel and initramfs.
Delete the line 'hiddenmenu' and increase the timeout to display GRUB menu properly. Save the changes and reboot.

Resources