|
|
#1 |
|
Prospect
Join Date: Apr 2012
Posts: 3
|
Using Unix Terminal to free disk space?
Hello,
I am new to this forum but wondered if you might be able to assist please? I ran very low on disc space (stupid I know) and as a result my Macbook Pro won't boot, it womn't start in safe mode either. If I try and start it using the disk it won't let me repair it because I only have 5MB of space available and it needs 5.3MB... My question is, can I free any more disc space using terminal via single user mode? I have fun fsck and mounted the disc, I have selected the directory I want to work with but I can't get it to delete files to create about 3mb of space. I can't FireWire as I don't have another Mac to use. Thank you very much for your support. My OS is OS X Leopard |
|
|
|
|
|
#2 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,941
|
By default, the disk is mounted as read-only in single-user mode.
To mount it as read/write, run the following command: /sbin/mount -uw / (I think this is mentioned in the text that you see when you start up in single-user mode) After that, you will be able to remove files using 'rm'. Of course you need to be extremely careful as removing the wrong files could render your system unrecoverable.
__________________
hayne.net/macosx.html |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Apr 2012
Posts: 3
|
Thank you, I had already used the /sbin/mount -uw / code but I couldn't get it to actually delete files, or at least if it was then when I checked disc space is wasn't increasing? Is there a way to find the largest files using Unix and then what do the different codes refer to e.g. rm -r rm -f and do I need a different code for say a file than a folder?
Thank you |
|
|
|
|
|
#4 |
|
Prospect
Join Date: Apr 2012
Posts: 3
|
Oh! And do I need to refer to the full file location or can I simply use rm filename ?
|
|
|
|
|
|
#5 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,050
|
What he said. Clearing out disk space with the Terminal is a great way to break your computer - it's one of those "if you have to ask how..." deals. The following should make enough space to enable the machine to boot. You can't copy-paste so type carefully - A single misplaced space will wipe out your entire drive. There are NO spaces between the first / and the final * Code:
rm /var/tmp/* rm /var/spool/cups/* rm /var/log/* Once it boots, empty the trash, and clear the caches in all your browsers. Then see what's left. |
|||||||||||||||||||||||
|
|
|
|
|
#6 |
|
Triple-A Player
Join Date: Mar 2009
Location: Turkey
Posts: 219
|
Under /Users/Whatever-your-account-name-is/
directory Downloads or Documents or Movies or Music, etc... are likely to hold big files you might go after and delete them too
__________________
Mac mini G4 1.25GHzLeopard 10.5.8, Mac mini C2Duo 2.0GHz Lion 10.7.2 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|