Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将一个巨大的文本文件拆分为单独的文本文件。我用:
split -l 1000 file.txt split_file
我会得到split_fileaa,split_filebb等。
split_fileaa
split_filebb
如何将扩展名更改为
split_file0.txt, split_file1.txt, etc?
split_file0.txt, split_file1.txt, etc
--additional-suffix是您需要的附加后缀:
--additional-suffix
split -l 1000 -d --additional-suffix=.txt file.txt split_file
有一个-d数字后缀选项。
-d