Help finding missing disk space

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Help finding missing disk space

Post by juliebarkley »

I am rather new at ImageMagick and the command line in general. I needed to batch convert some images, but used the convert command rather than mogrify several times (which didn't work). I got error messages each time it failed, but didn't realize that the available space on my computer was dropping by 1-2GB each time I ran the command. I thought this was probably temp files left over after the failed convert, so I restarted, but the space is still in use. I have about 10GB "missing" now. Could someone help me figure out what happened, and how to get that space back? I am running MacOS 10.6.8. I'm not sure of the ImageMagick version as I don't know how to check it :oops: but it is at least 1 year old.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

To check the IM version, type

Code: Select all

convert -version

How did you install IM? Did you install from MacPorts or from the IM binary or from the IM source code?

What do you get from either

Code: Select all

type -a convert

or

which -a convert
Check your /tmp directory and see if it has Imagemagick files listed.

Code: Select all

cd /tmp
ls
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

Thanks for helping!

Ok, my version is ImageMagick 6.8.9-1 Q16 i386 2014-07-25. It was installed with HomeBrew.

Both of the convert -a commands give: convert is /usr/local/bin/convert

It looks like my /tmp directory contains some weird stuff:

Code: Select all

Macintosh:tmp juliebarkley$ ls
Digital Editions
KSOutOfProcessFetcher.501.HVXI9pQwBk_bgiVJaTNhiQNhqxc=
adobe-de
icssuis501
launch-8fKNjW
launch-8rOIOm
launch-JrvivE
launchd-1204.XE3z9M
launchd-90.8gCT4l
I'm guessing these are all ImageMagick files except Digital Editions and adobe-de (possibly also icssuis501?). I'm not sure how to check that, or delete them, though. If I search for these through the normal Mac search, I come up empty (no surprise). As I said, noob to the command line.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

No, Imagemgick files would say "magick", if I recall correctly. I do not know where these came from.

Use

Code: Select all

ls -al 
to see the file sizes.
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

Hmm, I don't understand the result of ls -al:

Code: Select all

Macintosh:tmp juliebarkley$ ls -al
total 0
drwxrwxrwt  10 root          wheel  340 10 Dec 03:15 .
drwxr-xr-x@  6 root          wheel  204  1 Jan  2015 ..
drwxrwxrwx   2 juliebarkley  wheel   68  9 Dec 00:16 Digital Editions
drwx------   3 juliebarkley  wheel  102 10 Dec 02:10 KSOutOfProcessFetcher.501.HVXI9pQwBk_bgiVJaTNhiQNhqxc=
drwxrwxrwx   3 juliebarkley  wheel  102  8 Dec 22:52 adobe-de
srwxr-xr-x   1 juliebarkley  wheel    0  8 Dec 14:16 icssuis501
drwx------   3 juliebarkley  wheel  102  8 Dec 14:15 launch-8fKNjW
drwx------   3 juliebarkley  wheel  102  8 Dec 14:15 launch-8rOIOm
drwx------   3 juliebarkley  wheel  102  8 Dec 14:15 launch-JrvivE
drwx------   3 juliebarkley  wheel  102  8 Dec 14:15 launchd-90.8gCT4l
The "incident" happened on December 6 at about 4am, so it doesn't look like any of these files are the guilty parties anyway.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

The files are too small to be of significant loss of disk space. Sorry, I have no further suggestions. Might you have accidentally duplicated some directory?
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

I'm going to go through my backups to see if I can figure out where the space went. I was watching free disk space drop as the command was running, so I know it was related to the malformed ImageMagick command, but that's about it. Thanks so much for your time and effort anyway!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

Free disk space may go up as Imagemagick runs, since it may use disk space for temps and certain will write output images to disk. But it should drop again, especially if you reboot, if the temps are deleted automatically as they should. Did you check that?
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

I did restart the computer, but there was no change. Well, it did clear some space as always on a restart, but not as much as I was hoping for.
Last edited by juliebarkley on 2015-12-15T21:10:20-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

There are tools you can get that will search your disk for very large files. Perhaps that will help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

Another possibility is that your disk space is fragmented and needs to be defragmented. But if you go that route, be sure to back it up first.
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

There are tools that will search for very large files? Could you name some?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

For Mac, see for example Grandperspective or Omnidisksweeper or just do a google search for such tools.

Try google search for

"mac application find missing disk space"

or

"mac application find large files"
juliebarkley
Posts: 7
Joined: 2015-12-08T12:25:11-07:00
Authentication code: 1151

Re: Help finding missing disk space

Post by juliebarkley »

Thank you! I used GrandPerspective and found 649 files, whose names all start with "magick-", in private/var/tmp. Since they are all around 13-14 MB, that makes almost 9GB. Thank you again very much for sharing your time and expertise.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help finding missing disk space

Post by fmw42 »

Sorry, I did not know where your install set the tmp directory. On my system I have

lrwxr-xr-x@ 1 root wheel 11 Oct 19 2014 tmp -> private/tmp

So /tmp is linked to /private/tmp

See http://www.imagemagick.org/script/resources.php about setting the tmp directory.
Post Reply