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

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

  •  02-10-2022
  •  | 
  •  

문제

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!

도움이 되었습니까?

해결책

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

ln ../notes/linux.txt

from inside the web directory.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top