Created
April 4, 2017 12:53
-
-
Save IQAndreas/ab4302c2af77027924f52a31025148ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $ echo "COMPRESSED" > file.gz; | |
# $ ln file.gz hardlink; | |
# $ cat file.gz | |
COMPRESSED | |
# $ cat hardlink | |
COMPRESSED | |
# $ echo "Let's pretend this is the temporary uncompressed file" > temp | |
# $ mv temp file.gz | |
# $ cat file.gz | |
Let's pretend this is the temporary uncompressed file | |
# $ cat hardlink | |
COMPRESSED | |
# ------------------------------------------------------------------- | |
# And yes, gzip does create a brand new inode for the second file | |
# $ echo "This is the uncompressed file" > file | |
# $ ls -1i | |
1704683 file | |
# $ gzip file | |
# $ ls -1i | |
1704684 file.gz | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment