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.
3 Comments
pelya@lemmy.world · 1 pts · 18d
Huh, I actually forgot
catis used to join several files together. Last time I needed to concatenate two files, I didBut 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 -dwill do by default. So I naturally doI've heard rumours that
xzhas a special option to not delete the original file, but I know no one brave enough to search through thexzmanpage.PancakesCantKillMe@lemmy.world · 1 pts · 18d
Useless use of cat award.
a_non_monotonic_function@lemmy.world · 1 pts · 18d
Who
cats intowc?