2
votes
1answer
99 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
0answers
173 views

shortcut to recursively copying a directory preserving modes, ownerships and hard and symbolic links

I am using the following to recursively copy a directory while preserving modes, permissions as well as hard and symbolic links: cp -pr --preserve=links dir-a dir-b However I have the following ...
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 ...