I ran the following bash command to merge several big files
cat file1.txt file2.txt file3.txt file4.txt > merged.txt
The process is very long as the files make about 12 GB each. On the activity monitor
(Mac OSX 10.11.3), under the tab called Disk
, I see the following entry for the process of interest
How is it possible in this cat
process that more bytes are being written than read?
cat
. Either it can access the file or not, and the timestamps, etc., are ignored bycat
on the input files. The output file, however, that the shell creates has to have the file meta data reproduced in each inode that is used for the new file.cat
a fully sparse file to another file in Linux (BTRFS filesystem)iotop
indicates the process reads very little and writes a lot. A sparse text file is uncommon though, so this is just a very general remark of mine.