The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Hardware and Peripherals (http://hintsforums.macworld.com/forumdisplay.php?f=21)
-   -   OS X out of disk space when isn't (http://hintsforums.macworld.com/showthread.php?t=74988)

accsl 07-09-2007 07:26 PM

OS X out of disk space when isn't
 
This morning my hard drive was out of disk space.
First I just opened "Macintosh HD" and checked the sizes of all the folders (approx 20gb in all seven folders combined)
That seemed normal, so I deleted warcraft and some music to make a little room and installed "Omni disk sweeper" and "Disk inventory X"
I ran Omni disk sweeper and it said I had 19.97 gigs on the drive.
However the drive says I have a capacity of 37.14 and that I am using 34.27.
So there is about 14gb that may or may not be on the drive, but either way the drive thinks it's there. Anybody know how I can fix this?
Thanks


P.S. I am using a 12inch 1.33ghz Powerbook PC. With a 40 gig drive.

bouncinshoes 07-09-2007 09:24 PM

Do you have an external hard drive that you plug in ?

hayne 07-09-2007 09:44 PM

As an alternative to using OmniDiskSweeper or DiskInventory, open a Terminal window (Terminal is under /Applications/Utilities) and enter the following command:
sudo du -x -h -d 1 /
Look to see which sub-folder is taking up the most space and repeat with that folder. If you have trouble interpreting the results, just copy & paste them back here and we can help.
(This method will work in cases where the above 3rd-party utilities fail to show where the disk space is going - i.e. the case where the files are in folders that you don't have permission to read. Note that the 'du' command may take several minutes to finish, so be sure to wait until you get the prompt back.)

macosnoob 07-09-2007 10:03 PM

1 Attachment(s)
I'm a big fan of GrandPerspective, http://grandperspectiv.sourceforge.net/. You can't beat it for a quick graphical overview of everything on the HD. (It seems to show everything: that big red rectangle in the upper left is the sleep image!)

hayne 07-09-2007 10:33 PM

Quote:

Originally Posted by macosnoob (Post 392012)
I'm a big fan of GrandPerspective, http://grandperspectiv.sourceforge.net/. You can't beat it for a quick graphical overview of everything on the HD. (It seems to show everything: that big red rectangle in the upper left is the sleep image!)

I also like GrandPerspective - but it definitely doesn't show everything.
For example, it doesn't show anything about the files under the folder /var/spool/cups
This folder is owned by 'root' and only has read permission for owner (i.e. for 'root'). It is folders like this that might be hiding large files that wouldn't show up in the scans done by any of the above-mentioned utilities - since they run with the permissions of your user account. To see everything, you need 'root' privileges - e.g. via the use of 'sudo' in the 'du' command I suggested above.

schwartze 07-09-2007 10:56 PM

Do you use File Vault?

macosnoob 07-09-2007 10:56 PM

Thanks. I stand corrected.

Spongy 07-10-2007 12:21 PM

Or you could download an app that shows hidden files - Onyx or tinkertool will do it, then check through the system files to see what is there - When I have known people with problems like this it is usually that Norton 'space muncher' or whatever its called, where it basically fills up your hard drive with a 1 file in one of your cache folders - i have seen it as big as 30GB before, so if you use norton, it could be that!

HTH

hayne 07-10-2007 12:34 PM

Quote:

Originally Posted by Spongy (Post 392175)
Or you could download an app that shows hidden files - Onyx or tinkertool will do it, then check through the system files to see what is there

The problem is not with hidden files - these will be found by the above disk-space-inventory utilities. The problem is with files & folders that the user running the utility does not have permission to look at.

By the way, it is not generally recommended to run any Norton software on OS X - at least not on Tiger. Norton hasn't done a good job of keeping their apps up to date with changes in the system.

accsl 07-10-2007 02:21 PM

ok...we're gtting closer.
 
Ok So I tried terminal...(I know nothing about how terminal works)
I typed in the sudo thing and sure enough there was a folder called "private" with 14gb in it, it seems to be in a file called private/var.
Any idea what that is, or if I can safely delete it somehow?
here is the copy of the terminal info:
Code:

Last login: Tue Jul 10 11:05:18 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /
280M    /.Spotlight-V100
  0B    /.Trashes
512B    /.vol
7.0G    /Applications
1.0K    /automount
3.5M    /bin
  0B    /cores
  0B    /Desktop Folder
512B    /dev
8.0K    /Documents
7.1G    /Library
199M    /Microsoft Office X
512B    /Network
 14G    /private
2.2M    /sbin
1.2G    /System
  0B    /Temporary Items
  0B    /TheVolumeSettingsFolder
3.9G    /Users
378M    /usr
4.0K    /Volumes
 34G    /
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private
3.2M    /private/etc
4.0K    /private/tftpboot
 20K    /private/tmp
 14G    /private/var
 14G    /private
Oscars-comp:~ roadieone$


baf 07-10-2007 04:18 PM

No you can not yet delete anything.

do sudo du -x -h -d 1 /private/var and post that result.
if the biggie is log repeat again against that
sudo du -x -h -d 1 /private/var/log

accsl 07-10-2007 05:10 PM

seems to be the spool..?
 
Code:

Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private
3.2M    /private/etc
4.0K    /private/tftpboot
 20K    /private/tmp
 14G    /private/var
 14G    /private
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private/var/
  0B    /private/var//at
  0B    /private/var//audit
 24K    /private/var//backups
  0B    /private/var//cron
6.3M    /private/var//db
  0B    /private/var//empty
  0B    /private/var//launchd
3.7M    /private/var//log
  0B    /private/var//mail
  0B    /private/var//msgs
 12K    /private/var//named
  0B    /private/var//netboot
480K    /private/var//root
 68K    /private/var//run
  0B    /private/var//rwho
  0B    /private/var//samba
 14G    /private/var//spool
320K    /private/var//tmp
514M    /private/var//vm
  0B    /private/var//xgrid
 16K    /private/var//yp
 14G    /private/var/
Oscars-comp:~ roadieone$


ThreeDee 07-10-2007 06:10 PM

I think the spool is where CUPS and other printer-related stuff are located in.

hayne 07-10-2007 06:49 PM

Yes - there is 14 GB taken up in the /private/var/spool folder
So continue to "zoom in" with the 'du' command:

sudo du -x -d 1 /private/var/spool

accsl 07-10-2007 07:34 PM

so it's in the cups
 
Code:

Last login: Tue Jul 10 16:22:56 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private
3.2M    /private/etc
4.0K    /private/tftpboot
 20K    /private/tmp
 14G    /private/var
 14G    /private
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private/var
  0B    /private/var/at
  0B    /private/var/audit
 24K    /private/var/backups
  0B    /private/var/cron
6.3M    /private/var/db
  0B    /private/var/empty
  0B    /private/var/launchd
3.7M    /private/var/log
  0B    /private/var/mail
  0B    /private/var/msgs
 12K    /private/var/named
  0B    /private/var/netboot
480K    /private/var/root
 68K    /private/var/run
  0B    /private/var/rwho
  0B    /private/var/samba
 14G    /private/var/spool
320K    /private/var/tmp
514M    /private/var/vm
  0B    /private/var/xgrid
 16K    /private/var/yp
 14G    /private/var
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private/var/spool
 14G    /private/var/spool/cups
  0B    /private/var/spool/fax
  0B    /private/var/spool/mqueue
  0B    /private/var/spool/postfix
  0B    /private/var/spool/samba
 14G    /private/var/spool
Oscars-comp:~ roadieone$ sudo du -x -h -d 1 /private/var/spool/cups
  0B    /private/var/spool/cups/tmp
 14G    /private/var/spool/cups
Oscars-comp:~ roadieone$ sudo du -x -d 1 /private/var/spool/cups
0      /private/var/spool/cups/tmp
28842816        /private/var/spool/cups
Oscars-comp:~ roadieone$

I officially have no idea what anything in this message means.

navaho 07-10-2007 08:04 PM

Means your printer spool, or less likely something hiding in your prnter spool, has a lot of "stuff" in it.

cups


I'm anticipating that Hayne will want a directory listing of /private/var/spool/cups. I'm also guessing that list is longer than what you can copy/paste there.

hayne 07-10-2007 09:59 PM

Quote:

Originally Posted by navaho (Post 392284)
I'm anticipating that Hayne will want a directory listing of /private/var/spool/cups

That would indeed be the next step.

accsl:
Please launch the "Terminal" application (under /Applications/Utilities) and copy & paste the following commands, press Return, then copy & paste the results back here so we can see:

id
sudo ls -aol /private/var/spool/cups | head -n 30
echo "done"

accsl 07-11-2007 11:12 AM

Here are the spooled cups?
 
Code:

Last login: Tue Jul 10 16:28:07 on ttyp2
Welcome to Darwin!
Oscars-comp:~ roadieone$ id
uid=501(roadieone) gid=501(roadieone) groups=501(roadieone),
81(appserveradm), 79(appserverusr), 80(admin)
Oscars-comp:~ roadieone$ sudo ls -aol /private/var/spool/cups | head -n 30
Password:
total 28842816
drwx--x---  541 root  lp    -    18394 Jul 10 10:06 .
drwxr-xr-x    7 root  wheel  -      238 Oct 13  2006 ..
-rw-r-----    1 root  lp    - 45702992 Jul  2 02:14 00000255
-rw-r-----    1 root  lp    - 14130568 Jul  7 21:39 0000090f
-rw-r-----    1 root  lp    -  4195752 Jul  9 10:58 0000198c
-rw-------    1 root  lp    -      766 Oct 14  2006 c00001
-rw-------    1 root  lp    -    3520 Dec 12  2006 c00004
-rw-------    1 root  lp    -    3520 Dec 12  2006 c00005
-rw-------    1 root  lp    -    4776 Jan 23 15:27 c00007
-rw-------    1 root  lp    -    4780 Jan 25 11:26 c00008
-rw-------    1 root  lp    -    4830 Jan 25 11:28 c00009
-rw-------    1 root  lp    -    4764 Jan 25 12:45 c00010
-rw-------    1 root  lp    -    4806 Jan 26 11:32 c00011
-rw-------    1 root  lp    -    4824 Jan 26 11:42 c00012
-rw-------    1 root  lp    -    4840 Jan 26 11:44 c00013
-rw-------    1 root  lp    -    4810 Jan 26 11:44 c00014
-rw-------    1 root  lp    -    4818 Jan 26 11:47 c00015
-rw-------    1 root  lp    -    4798 Jan 26 11:48 c00016
-rw-------    1 root  lp    -    4798 Jan 26 11:48 c00017
-rw-------    1 root  lp    -    4826 Jan 26 11:52 c00018
-rw-------    1 root  lp    -    4922 Jan 26 11:53 c00019
-rw-------    1 root  lp    -    4818 Jan 26 11:58 c00020
-rw-------    1 root  lp    -    4818 Jan 26 11:58 c00021
-rw-------    1 root  lp    -    4804 Jan 26 11:59 c00022
-rw-------    1 root  lp    -    4802 Jan 26 12:02 c00023
-rw-------    1 root  lp    -    4836 Jan 26 12:03 c00024
-rw-------    1 root  lp    -    4782 Jan 27 17:37 c00025
-rw-------    1 root  lp    -    4802 Jan 29 11:53 c00026
-rw-------    1 root  lp    -    4802 Jan 29 11:54 c00027
Oscars-comp:~ roadieone$


trevor 07-11-2007 12:28 PM

Out of curiosity, could we see the results of the following commands as well?

sudo file /var/spool/cups/00000255
sudo file /var/spool/cups/0000090f
sudo file /var/spool/cups/0000198c


Trevor

accsl 07-11-2007 12:54 PM

is this what you need?
 
Code:

Last login: Wed Jul 11 08:04:39 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo file /var/spool/cups/00000255
Password:
/var/spool/cups/00000255: PDF document, version 1.3
Oscars-comp:~ roadieone$
Oscars-comp:~ roadieone$ sudo file /var/spool/cups/0000090f
/var/spool/cups/0000090f: PDF document, version 1.3
Oscars-comp:~ roadieone$ sudo file /var/spool/cups/0000198c
/var/spool/cups/0000198c: PDF document, version 1.3
Oscars-comp:~ roadieone$


ThreeDee 07-11-2007 01:03 PM

So a huge PDF file is stuck in the printer spool, with nowhere to go?

accsl 07-11-2007 01:17 PM

Let's delete it so I can give my boss back his computer.

ThreeDee 07-11-2007 01:18 PM

I'm no good at sudo rm-ing anything (and I don't want to mess your Mac), so I'm gonna let someone more experienced with the terminal help out here.

hayne 07-11-2007 01:24 PM

Quote:

Originally Posted by accsl (Post 392447)
Code:

Oscars-comp:~ roadieone$ sudo file /var/spool/cups/00000255
Password:
/var/spool/cups/00000255: PDF document, version 1.3
Oscars-comp:~ roadieone$
Oscars-comp:~ roadieone$ sudo file /var/spool/cups/0000090f
/var/spool/cups/0000090f: PDF document, version 1.3
Oscars-comp:~ roadieone$ sudo file /var/spool/cups/0000198c
/var/spool/cups/0000198c: PDF document, version 1.3


So those 3 big files are PDF files.
To delete them, run the following commands:

sudo rm /var/spool/cups/00000255
sudo rm /var/spool/cups/0000090f
sudo rm /var/spool/cups/0000198c

trevor 07-11-2007 01:44 PM

I'm concerned that there are additional large files in that directory. We only looked at 30 files previously. So, before you give this computer back to your boss, can you show us the results of

sudo ls -aolS /private/var/spool/cups | head -n 30

That added -S option to ls should show us the largest 30 files in the directory.

Trevor

accsl 07-11-2007 02:35 PM

I thought that was the light at the end of the tunnel...
 
So I did it, and then I did it again, and it said that there was no such file.
so I shut down and restarted and it still seems to have the same problem.

http://www.benspot.com/problem.jpg
..

trevor 07-11-2007 03:14 PM

Yes, the three files that were deleted were too small to be the sole source of the problem.
Code:

-rw-r-----    1 root  lp    - 45702992 Jul  2 02:14 00000255
-rw-r-----    1 root  lp    - 14130568 Jul  7 21:39 0000090f
-rw-r-----    1 root  lp    -  4195752 Jul  9 10:58 0000198c

So, the first file is 45,702,992 bytes, or about 45 MB. The second file is 14,130,568 bytes, or about 14 MB. The third file is 4,195,752 bytes, or about 4 MB. You've got a lot more large files in that directory. Which is why I asked you in my previous post to show us the largest 30 files in that directory.

Could you copy/paste the command I gave above so that we can check that?

Trevor

accsl 07-11-2007 03:22 PM

Last login: Wed Jul 11 12:08:17 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo ls -aolS /private/var/spool/cups | head -n 30
total 28717752
-rw-r----- 1 root lp - 82535977 Jun 29 18:19 d00179-001
-rw-r----- 1 root lp - 82535977 Jun 29 19:51 d00180-001
-rw-r----- 1 root lp - 82535977 Jun 29 21:03 d00181-001
-rw-r----- 1 root lp - 82535977 Jun 29 21:47 d00182-001
-rw-r----- 1 root lp - 82535977 Jun 29 22:03 d00183-001
-rw-r----- 1 root lp - 82535977 Jun 30 00:29 d00184-001
-rw-r----- 1 root lp - 82535977 Jun 30 00:41 d00185-001
-rw-r----- 1 root lp - 82535977 Jun 30 01:01 d00186-001
-rw-r----- 1 root lp - 82535977 Jun 30 02:24 d00187-001
-rw-r----- 1 root lp - 82535977 Jun 30 02:45 d00188-001
-rw-r----- 1 root lp - 82535977 Jun 30 03:21 d00189-001
-rw-r----- 1 root lp - 82535977 Jun 30 06:14 d00190-001
-rw-r----- 1 root lp - 82535977 Jun 30 07:12 d00191-001
-rw-r----- 1 root lp - 82535977 Jun 30 08:42 d00192-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:13 d00193-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:31 d00194-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:47 d00195-001
-rw-r----- 1 root lp - 82535977 Jun 30 10:28 d00196-001
-rw-r----- 1 root lp - 82535977 Jun 30 11:15 d00197-001
-rw-r----- 1 root lp - 82535977 Jun 30 12:19 d00198-001
-rw-r----- 1 root lp - 82535977 Jun 30 13:17 d00199-001
-rw-r----- 1 root lp - 82535977 Jun 30 14:40 d00200-001
-rw-r----- 1 root lp - 82535977 Jun 30 16:04 d00201-001
-rw-r----- 1 root lp - 82535977 Jun 30 17:05 d00202-001
-rw-r----- 1 root lp - 82535977 Jun 30 18:18 d00203-001
-rw-r----- 1 root lp - 82535977 Jun 30 19:27 d00204-001
-rw-r----- 1 root lp - 82535977 Jun 30 19:40 d00205-001
-rw-r----- 1 root lp - 82535977 Jun 30 21:46 d00206-001
-rw-r----- 1 root lp - 82535977 Jun 30 22:19 d00207-001
Oscars-comp:~ roadieone$

trevor 07-11-2007 03:45 PM

No. In post #25, I asked that you give me the results of
sudo ls -aolS /private/var/spool/cups | head -n 30

You gave me the results of 'sudo ls -aol', and did not add the 'S'. Please copy/paste the command from post #25.

Trevor

accsl 07-11-2007 04:16 PM

Sorry.

I realized the error and edited the previous post. but apparently not before you read it.

trevor 07-11-2007 05:04 PM

Odd. That's a whole lot of 82 MB files from June 30. What happened on June 30?

In any event, to delete all files that follow that pattern, try copy/pasting the following command:

sudo rm /var/spool/cups/d0????-001

(Yes, those question marks are intended.)

Once you've done that, please show us the results of

sudo ls -aolS /var/spool/cups | head -n 50

Trevor

accsl 07-11-2007 06:51 PM

The latest...
 
Last login: Wed Jul 11 12:24:01 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo rm /var/spool/cups/d0????-001
Password:
rm: /var/spool/cups/d0????-001: No such file or directory
Oscars-comp:~ roadieone$ sudo ls -aolS /var/spool/cups | head -n 50
total 28717752
-rw-r----- 1 root lp - 82535977 Jun 29 18:19 d00179-001
-rw-r----- 1 root lp - 82535977 Jun 29 19:51 d00180-001
-rw-r----- 1 root lp - 82535977 Jun 29 21:03 d00181-001
-rw-r----- 1 root lp - 82535977 Jun 29 21:47 d00182-001
-rw-r----- 1 root lp - 82535977 Jun 29 22:03 d00183-001
-rw-r----- 1 root lp - 82535977 Jun 30 00:29 d00184-001
-rw-r----- 1 root lp - 82535977 Jun 30 00:41 d00185-001
-rw-r----- 1 root lp - 82535977 Jun 30 01:01 d00186-001
-rw-r----- 1 root lp - 82535977 Jun 30 02:24 d00187-001
-rw-r----- 1 root lp - 82535977 Jun 30 02:45 d00188-001
-rw-r----- 1 root lp - 82535977 Jun 30 03:21 d00189-001
-rw-r----- 1 root lp - 82535977 Jun 30 06:14 d00190-001
-rw-r----- 1 root lp - 82535977 Jun 30 07:12 d00191-001
-rw-r----- 1 root lp - 82535977 Jun 30 08:42 d00192-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:13 d00193-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:31 d00194-001
-rw-r----- 1 root lp - 82535977 Jun 30 09:47 d00195-001
-rw-r----- 1 root lp - 82535977 Jun 30 10:28 d00196-001
-rw-r----- 1 root lp - 82535977 Jun 30 11:15 d00197-001
-rw-r----- 1 root lp - 82535977 Jun 30 12:19 d00198-001
-rw-r----- 1 root lp - 82535977 Jun 30 13:17 d00199-001
-rw-r----- 1 root lp - 82535977 Jun 30 14:40 d00200-001
-rw-r----- 1 root lp - 82535977 Jun 30 16:04 d00201-001
-rw-r----- 1 root lp - 82535977 Jun 30 17:05 d00202-001
-rw-r----- 1 root lp - 82535977 Jun 30 18:18 d00203-001
-rw-r----- 1 root lp - 82535977 Jun 30 19:27 d00204-001
-rw-r----- 1 root lp - 82535977 Jun 30 19:40 d00205-001
-rw-r----- 1 root lp - 82535977 Jun 30 21:46 d00206-001
-rw-r----- 1 root lp - 82535977 Jun 30 22:19 d00207-001
-rw-r----- 1 root lp - 82535977 Jun 30 22:26 d00208-001
-rw-r----- 1 root lp - 82535977 Jul 1 01:24 d00209-001
-rw-r----- 1 root lp - 82535977 Jul 1 01:37 d00210-001
-rw-r----- 1 root lp - 82535977 Jul 1 01:44 d00211-001
-rw-r----- 1 root lp - 82535977 Jul 1 03:56 d00212-001
-rw-r----- 1 root lp - 82535977 Jul 1 05:31 d00213-001
-rw-r----- 1 root lp - 82535977 Jul 1 06:33 d00214-001
-rw-r----- 1 root lp - 82535977 Jul 1 08:34 d00215-001
-rw-r----- 1 root lp - 82535977 Jul 1 10:35 d00216-001
-rw-r----- 1 root lp - 82535977 Jul 1 10:52 d00217-001
-rw-r----- 1 root lp - 82535977 Jul 1 12:19 d00218-001
-rw-r----- 1 root lp - 82535977 Jul 1 13:28 d00219-001
-rw-r----- 1 root lp - 82535977 Jul 1 14:07 d00220-001
-rw-r----- 1 root lp - 82535977 Jul 2 09:13 d00221-001
-rw-r----- 1 root lp - 82535977 Jul 2 11:10 d00222-001
-rw-r----- 1 root lp - 82535977 Jul 2 11:51 d00223-001
-rw-r----- 1 root lp - 82535977 Jul 2 13:24 d00224-001
-rw-r----- 1 root lp - 82535977 Jul 2 14:53 d00225-001
-rw-r----- 1 root lp - 82535977 Jul 2 15:12 d00226-001
-rw-r----- 1 root lp - 82535977 Jul 2 16:18 d00227-001
Oscars-comp:~ roadieone$

trevor 07-11-2007 07:34 PM

Hmm. So that didn't work.

I'm not sure why the wildcards aren't working (i.e. the ?s in the command). Perhaps someone else can explain that. Meanwhile, to get those deleted, you can use the following command, which will ask you whether you want to delete each one of those 82 MB files. If you are asked about one that doesn't follow the pattern, you may want to say no.

sudo rm -i /var/spool/cups/d0*


Once you've done that, please show us the results of

sudo ls -aolS /var/spool/cups | head -n 50

Trevor

hayne 07-11-2007 11:09 PM

Quote:

Originally Posted by trevor (Post 392592)
I'm not sure why the wildcards aren't working (i.e. the ?s in the command). Perhaps someone else can explain that.

It's because of the permissions on that folder (/var/spool/cups) and the fact that wildcards are expanded by the shell before the command is executed - i.e. before the 'sudo' is executed.

Here's an example of a similar situation:
Code:

% mkdir Stuff
% touch Stuff/foo1 Stuff/foo2 Stuff/foo3
% chmod 0 Stuff
% ls Stuff
ls: Stuff: Permission denied
% sudo ls Stuff
foo1    foo2    foo3
% sudo ls Stuff/foo?
ls: Stuff/foo?: No such file or directory


trevor 07-12-2007 12:42 AM

Quote:

Originally Posted by hayne (Post 392630)
It's because of the permissions on that folder (/var/spool/cups) and the fact that wildcards are expanded by the shell before the command is executed - i.e. before the 'sudo' is executed.

OK, then the * in my next attempt to delete these files won't work either. So how does one delete those files without

1. becoming temporary root user, such as using sudo -s, and then deleting them with wildcards, or
2. deleting every one individually, or
3. temporarily changing the permissions on the folder, removing them, and then changing the permissions back?

Trevor

hayne 07-12-2007 01:11 AM

Quote:

Originally Posted by trevor (Post 392647)
OK, then the * in my next attempt to delete these files won't work either. So how does one delete those files without

1. becoming temporary root user, such as using sudo -s, and then deleting them with wildcards, or
2. deleting every one individually, or
3. temporarily changing the permissions on the folder, removing them, and then changing the permissions back?

The easiest way is definitely using 'sudo -s' to get a root shell and then being very careful what you do in that shell and being sure to exit from it immediately afterwards.

But you could use 'find' - e.g. something like:

sudo find /var/spool/cups -name 'd0????-001' -delete

It would probably be a good idea to use the '-maxdepth' option to limit the 'find' to files directly under that folder:

sudo find /var/spool/cups -maxdepth 1 -name 'd0????-001' -delete

trevor 07-12-2007 10:57 AM

Great! Thanks Hayne.

So, accsl, can you use Hayne's command to delete the files,

sudo find /var/spool/cups -maxdepth 1 -name 'd0????-001' -delete

then follow up with

sudo ls -aolS /var/spool/cups | head -n 50

...to take a look at the 50 biggest files in the directory?

Trevor

accsl 07-12-2007 12:14 PM

I think that did it!
 
Last login: Thu Jul 12 09:02:34 on ttyp1
Welcome to Darwin!
Oscars-comp:~ roadieone$ sudo find /var/spool/cups -maxdepth 1 -name
'd0????-001' -delete
Oscars-comp:~ roadieone$ sudo ls -aolS /var/spool/cups | head -n 50
total 7056
drwx--x--- 358 root lp - 12172 Jul 12 09:07 .
-rw------- 1 root lp - 9985 Jul 10 10:02 c00357
-rw------- 1 root lp - 9985 Jul 10 10:06 c00358
-rw------- 1 root lp - 9963 Jun 29 18:19 c00179
-rw------- 1 root lp - 9963 Jun 29 19:51 c00180
-rw------- 1 root lp - 9963 Jun 29 21:03 c00181
-rw------- 1 root lp - 9963 Jun 29 21:47 c00182
-rw------- 1 root lp - 9963 Jun 29 22:03 c00183
-rw------- 1 root lp - 9963 Jun 30 00:29 c00184
-rw------- 1 root lp - 9963 Jun 30 00:41 c00185
-rw------- 1 root lp - 9963 Jun 30 01:01 c00186
-rw------- 1 root lp - 9963 Jun 30 02:24 c00187
-rw------- 1 root lp - 9963 Jun 30 02:45 c00188
-rw------- 1 root lp - 9963 Jun 30 03:21 c00189
-rw------- 1 root lp - 9963 Jun 30 06:14 c00190
-rw------- 1 root lp - 9963 Jun 30 07:12 c00191
-rw------- 1 root lp - 9963 Jun 30 08:42 c00192
-rw------- 1 root lp - 9963 Jun 30 09:13 c00193
-rw------- 1 root lp - 9963 Jun 30 09:31 c00194
-rw------- 1 root lp - 9963 Jun 30 09:47 c00195
-rw------- 1 root lp - 9963 Jun 30 10:28 c00196
-rw------- 1 root lp - 9963 Jun 30 11:15 c00197
-rw------- 1 root lp - 9963 Jun 30 12:19 c00198
-rw------- 1 root lp - 9963 Jun 30 13:17 c00199
-rw------- 1 root lp - 9963 Jun 30 14:40 c00200
-rw------- 1 root lp - 9963 Jun 30 16:04 c00201
-rw------- 1 root lp - 9963 Jun 30 17:05 c00202
-rw------- 1 root lp - 9963 Jun 30 18:18 c00203
-rw------- 1 root lp - 9963 Jun 30 19:27 c00204
-rw------- 1 root lp - 9963 Jun 30 19:40 c00205
-rw------- 1 root lp - 9963 Jun 30 21:46 c00206
-rw------- 1 root lp - 9963 Jun 30 22:19 c00207
-rw------- 1 root lp - 9963 Jun 30 22:26 c00208
-rw------- 1 root lp - 9963 Jul 1 01:24 c00209
-rw------- 1 root lp - 9963 Jul 1 01:37 c00210
-rw------- 1 root lp - 9963 Jul 1 01:44 c00211
-rw------- 1 root lp - 9963 Jul 1 03:56 c00212
-rw------- 1 root lp - 9963 Jul 1 05:31 c00213
-rw------- 1 root lp - 9963 Jul 1 06:33 c00214
-rw------- 1 root lp - 9963 Jul 1 08:34 c00215
-rw------- 1 root lp - 9963 Jul 1 10:35 c00216
-rw------- 1 root lp - 9963 Jul 1 10:52 c00217
-rw------- 1 root lp - 9963 Jul 1 12:19 c00218
-rw------- 1 root lp - 9963 Jul 1 13:28 c00219
-rw------- 1 root lp - 9963 Jul 1 14:07 c00220
-rw------- 1 root lp - 9963 Jul 2 09:13 c00221
-rw------- 1 root lp - 9963 Jul 2 11:10 c00222
-rw------- 1 root lp - 9963 Jul 2 11:51 c00223
-rw------- 1 root lp - 9963 Jul 2 13:24 c00224
Oscars-comp:~ roadieone$

Just clicked on the drive and there are 16 available gigs!
You guys are awesome! and I'm sure if I understood anything about what just happened in terminal I would be even more wowed that you were able to figure it out.
Thank you very much.
accsl


All times are GMT -5. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.