creating a hardlink to a file contained in one subdirectory into another subdirectory [closed]

StackOverflow https://stackoverflow.com/questions/21348539

  •  02-10-2022
  •  | 
  •  

Pergunta

hey guys so im using Ubuntu and im having a issue finding the files using the ln command

currently i have a folder called myName.2 within it are 3 folders notes, assignments and web. within notes i created 3 files called linux.txt, unix.txt and shell.txt, now i have redirected myself so im in the folder web and want to create hard links to these files here, so for example i type the command

ln /home/admin/3000/Assignment1/myName.2/notes/linux.txt

however the terminal is telling me,

ln: accessing `/home/admin/3000/Assignment1/myName.2/notes/linux.txt': No such file or directory

i went to the properties of the linux text file and copy and pasted the path straight from there

any hints would be much appreciated thanks!

Foi útil?

Solução

It's easy to make typos, and simpler to use relative paths. Try:

ln ../notes/linux.txt

from inside the web directory.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top