В bash вы можете использоватьedit-and-execute-command
(Ctrl + x , Ctrl + e)для редактирования команды в вашем любимом редакторе:
edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell commands.
Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.
Способ перемещения в определенное место зависит от вашего редактора. Если вы используете vim, вы можете установить курсор на точное слово с помощью плагина vim -easymotion .
Вы пытались создать жесткую ссылку на каталог
root@rpiserver:~# mkdir fun
root@rpiserver:~# ln fun fun_hard
ln: fun: hard link not allowed for directory
root@rpiserver:~#
Согласно ln --help
это невозможно
-d, -F, --directory allow the superuser to attempt to hard link
directories (note: will probably fail due to
system restrictions, even for the superuser)
Даже в качестве суперпользователя с -d
это не работает:
root@rpiserver:~# ln -d fun fun_hard
ln: failed to create hard link 'fun_hard' => 'fun': Operation not permitted
(Все это было протестировано здесь на Raspberry Pi с использованием ext4 в качестве файловой системы)