5

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

4
  • 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? Commented May 24, 2022 at 9:55
  • MC normally doesn't use temp files unless you work with archives. You could simply use cp -a or rsync -a instead. Commented May 24, 2022 at 10:20
  • I suspect that you press anything like 'Enter' when a huge zip/archive is selected. Commented May 24, 2022 at 10:24
  • OP copy 300 Gb from a 250 Gb disk, obviously some form of uncompression is done, hence need for temporary file. Commented May 24, 2022 at 13:54

2 Answers 2

4

What you're looking for is

MC_TMPDIR=path mc 
1
  • doesn't work with mc version 4.8.24 in Ubuntu - it still uses /tmp/mc-$USER Commented Aug 21, 2024 at 8:12
2

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.

1
  • so questioner may use it like this: mkdir /media/$USER/myDisk/.tmp && TMPDIR=/media/$USER/myDisk/.tmp mc Commented Aug 21, 2024 at 8:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.