4

I have an Ubuntu running on a 250 go ~ hard drive.

When I'm copying 300 go + folder to another location, using mc, I can see that it creates a tmp file located in /tmp/mc-$USER which getting bigger as far as the copy is processing until it reach the maximum and then mc is failing because no more space is available.

I have another drive with 2 To available space (/media/$USER/myDisk). Since I have more free space available in this disk, I wish I could specify to mc to use this disk instead in order to build the mc-$USER tmp file.

I'm wondering if to do so, I need to edit a setting from mc, maybe located in ~/.config/mc

or if I should specify an argument when running mc like mc --temp-path /media/$USER/myDisk/tmp

Thanks for your help

thanasisp
  • 8,122
  • I wouldn't expect mc to use so much temporary space just to copy files. How do you copy the files? select with "Insert" and F6? And how is it failing, do you get an error? – thanasisp May 24 '22 at 09:55
  • MC normally doesn't use temp files unless you work with archives. You could simply use cp -a or rsync -a instead. – Artem S. Tashkinov May 24 '22 at 10:20
  • I suspect that you press anything like 'Enter' when a huge zip/archive is selected. – thanasisp May 24 '22 at 10:24
  • OP copy 300 Gb from a 250 Gb disk, obviously some form of uncompression is done, hence need for temporary file. – Archemar May 24 '22 at 13:54

2 Answers2

4

What you're looking for is

MC_TMPDIR=path mc
1

For diving into tgz archives, Midnight Commander uses the path specified by the TMPDIR environment variable (Ubuntu mc package version 3:4.8.24-2ubuntu1).

It creates a subdirectory mc-$USER inside it.

AdminBee
  • 22,803