NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange "hard link" after fsck



Robert Elz a écrit :
     Date:        Mon, 18 Jan 2016 10:03:39 +0100
     From:        =?UTF-8?Q?BERTRAND_Jo=c3=abl?= <joel.bertrand%systella.fr@localhost>
     Message-ID:  <569CAA6B.6070601%systella.fr@localhost>

   | I have done fsck in single user mode on all slices and fsck has
   | reconnected a directory in /usr/lost+found.

   | I don't understand how delete this directory,

You should probably work out what it was first, from the link count,
it clearly contains a sub-directory, and perhaps other files.

   | it seems to be a hard link on /root but /root and /usr are
   | not on the same slice !...

As you suspect, that is not possible.


   | legendre# cd lost+found/
   | legendre# ls -l
   | total 2
   | drwxr-xr-x  3 root  wheel  512 Jul 18  2015 #3470097
   | legendre# pwd
   | /usr/lost+found
   | legendre# cd #3470097/

That's your mistake, '#' is the comment character, what you just did
was "cd" - ie: "cd ${HOME}"

Just quote the #, ...

	cd \#3470097

(the trailing / is not needed), and then look around.  You'll need to do
that (with \ " or ' quoting, every time you refer to it.

You might prefer to just rename it first

	mv \#3470097 recovered

(or whatever name you prefer) and proceed from there.

Thanks a lot for your answer. I have used sh completion and it has removed the first '\'.

	Regards,

	JB



Home | Main Index | Thread Index | Old Index