Почему я не могу создать жесткую ссылку в каталоге Ubuntu?

В 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 .

0
27.08.2021, 02:18
1 ответ

Вы пытались создать жесткую ссылку на каталог

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 в качестве файловой системы)

0
27.08.2021, 04:23

Теги

Похожие вопросы