• pelya@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    16 days ago

    Huh, I actually forgot cat is used to join several files together. Last time I needed to concatenate two files, I did

    { cat file1 ; cat file2 ; } > output
    

    But the most valid case is when I want to unpack .gz or .xz archive but do not want to delete the original file, as xz -d will do by default. So I naturally do

    cat input.img.xz | xz -d > output.img
    

    I’ve heard rumours that xz has a special option to not delete the original file, but I know no one brave enough to search through the xz manpage.