小编fus*_*y89的帖子

为什么cygwin不会读取我的主目录中的.ssh/config文件?

我正在使用cygwin,我正在尝试设置.ssh/config文件.Cygwin的文件夹在我的C:驱动器中.我的主目录是C:\ Users\USER.我注意到当我编辑C:\ Users\USER.ssh\config时,cygwin甚至没有注意到它(即使它注意到我在USER文件夹中的其他文件,即.bashrc).但如果我把它放在C:\ cygwin64\home\USER.ssh\config中,它会注意到配置文件.

有没有办法让cygwin读取我的USER主目录中的.ssh文件夹?

windows ssh cygwin windows-7

4
推荐指数
1
解决办法
5351
查看次数

管道时没有这样的文件或目录.每个命令单独工作,但在管道时不工作

我有2个文件夹:folder_a&folder_b.在每个文件夹中都有一堆文件.我正在尝试sed将所有这些文件从这些文件夹中移出,并进入我当前的工作目录.

我的文件夹结构如下所示:

mytest:
    a:
        1.txt
        2.txt
        3.txt
    b:
        4.txt
        5.txt
Run Code Online (Sandbox Code Playgroud)

我试图使用的命令是:

find . -type d ! -iname '*.*'  # find all folders other than root
    | sed -r 's/.*/&\/*/'      # add '/*' to each of the arguments
    | sed -r 'p;s/.*/./'       # output: a/* . b/* .
    | xargs -n 2 mv            # should be creating two commands: 'mv a/* .' and 'mv b/* .'
Run Code Online (Sandbox Code Playgroud)

不幸的是我收到一个错误:

mv: cannot stat './aaa/*': No such file or …
Run Code Online (Sandbox Code Playgroud)

linux bash sed sh

2
推荐指数
1
解决办法
777
查看次数

标签 统计

bash ×1

cygwin ×1

linux ×1

sed ×1

sh ×1

ssh ×1

windows ×1

windows-7 ×1