![]() ![]() ![]() As tar works in a more speedy and efficient way. This makes tar clearly win in comparison of cp vs tar. Tar also uses multiple threads to read and write and can even several files at once. And while tar does reading and writing in a separate process. The reason behind that is cp does open-read-close-open-write-close in a loop. In cp vs tar, tar sometimes has much higher copy speed than cp. | pv | (cd /output/directory & tar xvf -) Cp vs tar why is the speed difference? Now if you want, you can also use pv to help you monitor the progress of copying files. All the files and subfolders are copied from the current directory to the /output/directory. While executing the command just replace /output/directory with the directory in which you want to copy files. Now just run the command below to copy files. Now in terminal change the current directory to the folder from which you want to copy files. To copy files open a terminal, it can generally be opened by Ctrl + Alt + T. How to copy files faster using tar command in Linux Sometimes providing a faster and safer alternative. These commands should help you get your copying done in the fastest way.įor copying sometimes the tar command can be a better alternative. So I started searching and came across these commands which can offer better copying speed.Īs simple cp command is very useful but sometimes it can slow down the process. Have you tried copying large files on Linux, sometimes it just takes ages? I was doing that when I thought there should be a faster and better way to copy files in Linux. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |