All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Cannot rm broken NTFS link

I'm trying to use an old windows NTFS drive as extra storage on a raspberry pi. I tried to delete everything on it, but came across a problem where I can't remove two broken links. I can format the ...
1
vote
1answer
36 views

Find (and delete) all files with hard link count = 1

I'm having a tough time trying to reclaim some unused disk space on one of my macOS 10.13 partitions. Thanks to GrandPerspective, I think I found out that every time I delete some items in Photos for ...
1
vote
1answer
38 views

Safely remove a symlink or hardlink

Does using rm on a symlink or a hard-link remove the source in addition to the link? Is there a good way to delete a hard-link or a symlink without deleting the source? And if there is a good way ...
1
vote
1answer
725 views

unlink delete files which are not links [duplicate]

I created a hard link $ ln hours.sh hours_link test it $ ls -l hours* -rw-r--r-- 2 me staff 653 Apr 12 2018 hours.sh -rw-r--r-- 2 me staff 653 Apr 12 2018 hours_link remove it with unlink $ ...
0
votes
2answers
1k views

Rm hardlink without removing file/directory itself

Say I create a hardlink with ln x y. Is there a way to remove the link at y without removing the file at x, after I create the link? It looks like I did a rm -rf on y and it deleted x as well, would ...
29
votes
4answers
3k views

How to unlink (remove) the special hardlink “.” created for a folder?

On Linux, when you a create folder, it automatically creates two hard links to the corresponding inode. One which is the folder you asked to create, the other being the . special folder this folder. ...
2
votes
1answer
171 views

Deleting hardlink with rm -rfv deletes the original?

I was reading up on similar questions on here about what happens when you delete a hardlink to a file and the majority of the answers I was getting were that the hardlink is deleted but the original ...
5
votes
1answer
244 views

Is there a tool to create a hard link to an unlinked inode?

Assume you have a filename/directory name, whatever, which is hard linked to inode 6400. Alas, the file/directory actually exists (completely intact, and maybe it only lives in a single data block, ...
27
votes
4answers
14k views

Can a file be retrieved by its inode?

I ran following commands in the order specified: $ln a b $ls -i a b 523669 a 523669 b $rm -f a $ls -i b 523669 b I concluded from this test that the command rm actually removes only the filename (a ...
3
votes
1answer
2k views

How to safely remove hard-link to home folder?

In a folder owned by my user /sites/Website there is a dir named ~. When I cd to this directory, I am redirected to ~/, my home folder. At first I thought this was a symbolic link, but doing ls -...