1
vote
1answer
20 views

replace hard links with copies

I have a file which has other hard links. I want to let it become independent. I know it can be done like this: mv myfile temp cp -a temp myfile Is there any single command which does not require ...
0
votes
1answer
25 views

Is there a way to catch all invokations of hardlink creation and replace them with symbolic links?

Assume I have a program or build script (consider it a blackbox) which is creating hardlinks and run on Linux (Debian 7.4). If I want to experiment and find out whether the program would work with ...
0
votes
2answers
82 views

Safe to delete a folder named “~” [duplicate]

I program I was using to out put some files apparently did not understand the short cut "~" (directory) very well and has done some trickery that has me confused. Rather than put the files where I ...
0
votes
1answer
83 views

Changing specific shared library of linux executable

I'm building an android application on a GNU/Linux based server and aapt is complaining that lib/libz.so.1 is out of date: /lib/libz.so.1: no version information available (required by .../aapt) ...
0
votes
0answers
49 views

Backup a linux partition without imaging

Typically to backup my Windows partitions (note: pre-Vista/2008 Windows, no symlinks), I usaully tar caf /backup/<name><date>.tar.xz /mnt/<fs>. Currently, I use dd | xz to backup ...
2
votes
1answer
92 views

copying a file to a hard link

I recently got bit by a misbehaving in a bash script of mine and was wondering: is this the expected system behavior, or is it a bug what are the ideal workarounds Essentially, the problem boiled ...
1
vote
1answer
78 views

Why the link between .. and the parent dir is hardlink?

I just noticed that the link between .. and the parent dir is hardlink, they have the same inode number: starpinker@host /home/starpinker/unix $ ls -ail 8200794 drwxrwxr-x 2 starpinker starpinker ...
0
votes
3answers
79 views

directory in /proc/sys/net/ipv4/config have no hard links?

Why the directories inside /proc/sys/net/ipv4/config have no hard links? ls -l /proc/sys/net/ipv4/conf total 0 dr-xr-xr-x 0 root root 0 Dec 31 08:27 all dr-xr-xr-x 0 root root 0 Dec 31 08:27 default ...
3
votes
2answers
1k views

How can I find all hardlinked files on a filesystem?

I need to find all hardlinked files on a given filesystem. E.g. get a list of files, each line contains linked pairs, or triplets, etc. I understand more or less how to do it, one needs to create a ...
0
votes
2answers
139 views

Is it possible to create a file and a hardlink to it without initializing the data?

I want to create a file of 2GB, but I don't care about the contents of it. I currently use dd with /dev/zero, but this is fairly slow. Is it possible to create a file and a hardlink to it, without ...
1
vote
0answers
148 views

Efficient mirroring of directories using hardlinks

I'm backing up my music collection on to a number of NTFS-formatted external hard-drives; however, as I store my main collection in FLAC and have my library on my laptop as MP3s to save space, I want ...
0
votes
1answer
175 views

Identify files that would be deleted when removing an rsync --link-dest directory?

I have a Time Machine-style backup system set up on my NAS (running BusyBox v1.16.1), using rsync --link-dest as described here: http://blog.interlinked.org/tutorials/rsync_time_machine.html Is there ...
4
votes
2answers
480 views

What are the pitfalls of hardlinked files on my desktop PC?

All the identical-content files on my PC are now hardlinked. (My data is completely de-duplicated. It is a consequence of the way I copied my data from my old computer.) What pitfalls do I need to ...
0
votes
1answer
1k views

Find modified files from rsync backup script

I'm using rsync on my Ububtu Linux server to take a time machine like backup of the system. Every hour, a cronjob runs the following script (partial excerpt): rsync -a --link-dest=/backup/current ...
0
votes
1answer
141 views

rsync: how to recreate hard-links after removed and recreated a file?

This is what I have: --dir1 ----file1 ----file2 Then I created another directory dir2 with hard-links. --dir2 ----file1 (hard link to dir1/file1) ----file2 (hard link to dir1/file2) Now I ...
4
votes
2answers
788 views

What is “ln -L” (--logical) for?

I can read in the ln man page: -L, --logical make hard links to symbolic link references I read somewhere that ln -L could be used to re-link files that were deleted but which are ...
5
votes
1answer
1k views

Why does du -sl show different sizes for the source and result of a cp -rl?

I have used cp -rl to copy a folder. When measuring the size of the source and of the result of the copy du -sl returns slightly different sizes, even though diff confirms that their content are ...
8
votes
4answers
2k views

What is a hard link in Linux?

I have searched around and am trying to understand the difference between a hard link and symbolic link (soft link). I found this link is quite useful. But I am still not very clear. I understand ...
3
votes
2answers
1k views

What's the difference between a Windows hard link and a Linux hard link?

The open source package BackupPC does not run on Windows due to its lack of support for hard links. I did a search and came across this document referring to hard links in Windows. Are these somehow ...
1
vote
2answers
473 views

How can I move a bunch of hardlinked files from a Linux box onto my OS X Mac and preserve the hardlinks?

I have an rsnapshot backup that I need to move off of a corrupt Linux file system. I need to preserve the internal hardlinks. I've tried rsync -H and using a newer rsync and neither preserve the ...
3
votes
1answer
150 views

Editing softlinked files in UNIX

Let's say I have file A, and using 'ln -s A B', I have B. When I open, edit and save B, now B is not symlink anymore. It's just a new copy of A. Is this expected behavior? I use Mac OS X, and I ...
23
votes
8answers
27k views

How can you see the actual hard link by ls?

I run ln /a/A /b/B I would like to see at the folder a where the file A points to by ls.