declone(1)
β¨ NAME β¨
declone β bestie's lil tool for breaking hardlinks π
π¦ SYNTAX π¦
declone file...
π DESCRIPTION π
Okay so listen. You know how ln(1) or hardlink(1) can make a hard link, right? Same inode, two names, one file, iconic behavior, they're literally sharing a vibe. declone says "not anymore, sweetie" and breaks that hard link for you. π
Here's the tea on what it actually does: it makes a copy of the file's contents, plus the ownership information, plus the standard permissions. That's it. That's the whole list.
β οΈ Important, no cap: it does not copy ACLs or SELinux contexts. So if you've got fancy access control going on, those bits are staying behind, bestie. π
πΈ EXAMPLE πΈ
Let's set the scene. Two hardlinks, made the old-fashioned way:
$ ln GNUmakefile new1
$ ln GNUmakefile new2
$ ls -li GNUmakefile new1 new2
-rw-r--r-- 3 jengelh users 2687 May 27 23:11 GNUmakefile
-rw-r--r-- 3 jengelh users 2687 May 27 23:11 new1
-rw-r--r-- 3 jengelh users 2687 May 27 23:11 new2
See that link count of 3? They're all holding hands. π€ Now watch declone do its little magic trick:
$ declone new2
* new2
And boom, check it now:
$ ls -li GNUmakefile new1 new2
-rw-r--r-- 2 jengelh users 2687 May 27 23:11 GNUmakefile
-rw-r--r-- 2 jengelh users 2687 May 27 23:11 new1
-rw-r--r-- 1 jengelh users 2687 May 28 09:10 new2
new2 said "I'm my own file now" β link count dropped to 1, and look at that timestamp, May 28 09:10 instead of May 27 23:11, because it's a fresh copy living its main character era. π The other two are still at 2, still linked to each other, which is exactly right. Slay. π
π«Ά SEE ALSO π«Ά
And that's a wrap, bestie!! π This lil page came to you from the hxtools collection, dated 2008-02-06 β vintage but still eating, fr fr. Go forth and declone responsibly, mwah πβ¨π
π¦ where this page comes from
- debian bookworm: hxtools 20221119-1 Β· MIT
- debian trixie: hxtools 20231224-2+b2 Β· MIT
- opensuse-leap 16.0: hxtools-man 20231224-bp160.1.12 Β· GPL-2.0-or-later AND WTFPL
- ubuntu jammy: hxtools 20211204-1 Β· GPL-2.0-or-later OR GPL-2+3 OR WTFPL
- ubuntu noble: hxtools 20231224-2ubuntu1 Β· MIT
- ubuntu questing: hxtools 20231224-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms