[SOLVED] how to copy commands output in places without mouse ?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to copy commands output in places without mouse ?
Hi
How to copy output of commands in environment that there is no mouse to highlight and copy part of the text? like vmware console or when we stuck in grub rescue .
sorry i asked it mistakenly here instead of asking it in newbie .
thanks for reply.
if i do that then i can open it with vi to copy part of text.
is there any command in vi that i can specify exact part of the text by high lighting to copy only the high lighted part?
i now the `y` option but i should specify number of character for it .i looking for easier way.
where do you want to copy to? vi does not handle external clipboard.
think that I'm going to take uuid from blkid command and use it in fstab . how can i copy the desired uuid ?
i aware of ssh but think that its not available .
in case you need that uuid on the same host you can save the output of blkid in a file, open this file and fstab in vi and you can use y (yank) and p (put) to copy lines between files and you can use :e# to switch between files.
For stuff like bootloader messages or kernel panics on real hardware, I use a camera. It also works for BIOS errors.
Same stuff on a virtual machine console can usually be done with a screen capture on the involved window.
Where a Unix-like system is running and there is hope of recovering the files afterwards, the script command is an alternative. If the files might not be savable on remote, run script locally if you can reconnect.
think that I'm going to take uuid from blkid command and use it in fstab
Basic steps:
1. run blkid and output to a temp file, optionally using awk, cut whatever to get uuid
2. vi temp file and tidy it up so it has ONLY the string you want & save it
3. edit fstab, move cursor to point of insertion, then
Code:
:r /path/to/temp.txt
r = read ; reads specified file and dumps content at current cursor position.
Unlike yank/put, doesn't require you to count lines, and text is stored in temp file on disk in case you need to redo. Any size/amt of text can be in temp file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.