There’s an annoying bug in almost every Linux distribution I’ve worked with. When your copying a large file to usb device (pendrive etc.) it hangs at the end (I mean it haaaaaaaaaaaaangs).
I’ve found a solution that works on Elementary and Ubuntu (at least).
Simply paste this two commands in your terminal:
sudo sh -c 'echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes'
sudo sh -c 'echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes'
Add this to some kind of startup script and forget about transfer problems…
Comments
0 responses to “When copying a large file on Linux transfer hangs at the end… And you want to f**king kill someone.”
Thanks for the correct command. I did find this on other forums but did not now the exact command for elementary.
How to add this to a startup script?
Create a file for your startup script and write your script in the file:
$ sudo nano /etc/init.d/superscript
Save and exit: Ctrl+X, Y, Enter
Make the script executable:
$ sudo chmod 755 /etc/init.d/superscript
Register script to be run at startup:
$ sudo update-rc.d superscript defaults