Rad*_*ugh 4 clipboard file-copy
每隔一段时间,我发现需要做:
cp /really/long/path/to/file.txt /totally/different/long/path/to/copy.txt
Run Code Online (Sandbox Code Playgroud)
由于我使用autojump
,进入目录非常快速和容易。但是,在从一个目录复制到另一个目录而不必输入至少一个完整路径时,我不知所措。
在 GUI 文件系统导航器中,这很容易:导航到第一个目录;复制原始文件;导航到第二个目录;和粘贴。但是对于cp
,似乎我无法分两步进行复制。
我正在做类似以下的事情:
(use autojump to navigate to the first directory)
$ copy file.txt
(use autojump to navigate to the second directory)
$ paste copy.txt
Run Code Online (Sandbox Code Playgroud)
而不是更长的类型:
(use autojump to navigate to the first directory)
$ cp file.txt /totally/different/long/path/to/copy.txt
Run Code Online (Sandbox Code Playgroud)
是否有提供我正在寻找的功能的工具?我在 OS X El Capitan 上使用 Zsh。
以下适用于bash
. 我没试过zsh
。
尝试:
echo ~- # Just to make sure you know what the "last directory" is
Run Code Online (Sandbox Code Playgroud)
然后:
cp file.txt ~-/copy.txt
Run Code Online (Sandbox Code Playgroud)
另见:
归档时间: |
|
查看次数: |
1657 次 |
最近记录: |