复制多个文件名字到文本软件
Copying some text to a new file is a common operation on Linux. I usually do this by opening the file with ‘vim’, pasting the text in ‘vim’, and then saving the file. I learned a more efficient and quicker way from my advisor during one discussion with him when I show him some results.
将一些文本复制到新文件是Linux上的常见操作。 我通常通过使用“ vim”打开文件,将文本粘贴到“ vim”中,然后保存文件来完成此操作。 当我向他展示一些结果时,在与他的一次讨论中,我从导师那里学到了一种更有效,更快捷的方法。
Here is the quicker way to copy text to a file.
这是将文本复制到文件的更快方法。
First, copy the text to the clipboard. In the gnome-terminal, it is ‘Ctrl+Shift+c’. In other GUI programs, it is usually ‘Ctrl+c’.
首先,将文本复制到剪贴板。 在gnome - terminal中 ,它是“ Ctrl + Shift + c”。 在其他GUI程序中,通常为“ Ctrl + c”。
Then, the most important part, past the text to a new or to-be-overwritten file, say ‘file.txt’:
然后,最重要的部分是将文本传递到一个新的或将要覆盖的文件中,例如“ file.txt”:
$ cat > file.txt
The ‘cat’ now is waiting for input from STDIN. We can paste the text to it by ‘Ctrl+Shift+v’.
现在,“猫”正在等待STDIN的输入。 我们可以通过“ Ctrl + Shift + v”将文本粘贴到其中。
The last step, press ‘Ctrl+d’ to tell ‘cat’ that we have finished inputting the text.
最后一步,按'Ctrl + d'告诉'cat'我们已经完成了文本的输入。
After this, the text is saved to the new file ‘file.txt’.
之后,文本将保存到新文件“ file.txt”。
I like this method much—it improves the efficiency significantly of this common operation and save much of my time.
我非常喜欢这种方法,它大大提高了此常规操作的效率,并节省了很多时间。
翻译自: https://www.systutorials.com/quickly-copying-text-to-a-file/
复制多个文件名字到文本软件