New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

OS 10.4 - Show Item Info


Post Reply New Thread Subscribe

 
Thread Tools
inflexion

 
inflexion's Avatar
 
Member Since: Jan 12, 2005
Location: /home/sheffield/UK
Posts: 1,278
inflexion will become famous soon enough
Mac Specs: 12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle

inflexion is offline
Is it me or doesn anyone else find this a load nothing but useless?

Im always creating and deleting files so the amount of disc space i have constantly changes but the info on the desktop doesnt even though it does in Finder

Anyone know of a method/hack to make this update more frequently?



Apple, think different
QUOTE Thanks
lil
Guest
 
Posts: n/a

Do you mean the hard disk space shown underneath 'Macintosh HD' (or whatever you have it named) if you have view options (command + j) set to show item info?

If so, yes - it doesn't update; and something needs doing about it as otherwise, Tiger is without a doubt the quickest OS to reflect file system changes - yet this little bit doesn't update unless you reboot which is ridiculous.

Relaunching the finder (command+option+esc) does refresh this info though but like you - that isn't good enough!

I'll see what can be dug up, but if anything, the Finder IMO needs a bit of TLC from Apple...

Vicky :flower:
QUOTE Thanks
lil
Guest
 
Posts: n/a

Ok, your post spurred me on to sort this 'bug' out. Before Tiger, Finder was notoriously slow at reflecting file system changes in some instances.

-----------
EDIT

I have attached a ZIP archive called Refresh Finder.zip In this you will find the filerefresh.sh shell script and the Refresh Finder.app AppleScript file. Create a folder called Scripts in your home folder's Documents folder. You will need to edit filerefresh.sh as shown in the rest of the information here.

The change required is to change the name of your home folder, as the filerefresh.sh file refers to 'vicky' as that is my home folder, unlikely yours is.

------------

I warn you, this will involve some use of the Terminal and some command line stuff, it's nothing complex (IMO) and if you stick to the instructions you will be fine, if you are already very terminal competent, you'll find this a walk in the park

OK,here's what I did...

First of all, open the Terminal. (Command + Shift + U on the finder desktop) will open the Utilities window, double click on Terminal, you should get something like:

Last login: Sun Oct 23 13:02:24 on ttyp1
Welcome to Darwin!
sunshinesista:~ vicky$


now to show how quick Tiger's finder is at showing file system changes, type the following (where it says <ENTER> press return/enter, do NOT type <enter>)

cd desktop <ENTER>

Make sure the finder desktop is visible as best can be, the above command stands for change directory, in other words it is like double clicking on a folder in finder.

Now type:

touch test.txt <ENTER>

Notice how quick that file ended up on the desktop? Quick isn't it!

rm test.txt <ENTER>

Will delete the file again. However, when I did this I did it in the root (that means the very bottom level) of the Macintosh HD (or my hard drive in the PowerBook) and to my surprise, the disk space free updated (the Show Item Info line). So here's the kludgey but fully system compliant, and resource light way of getting that info to update every minute.

Open TextEdit (Command + Shift + A, D'click textEdit), and switch to text mode (Shift + Command + T). Type the following (as it is shown!):

#!/bin/sh
touch /users/vicky/documents/scripts/update.txt
mv /users/vicky/documents/scripts/update.txt /
rm /update.txt
/users/vicky/documents/scripts/refreshfinder.app


Now do a save as, and to keep things easy, go to your main user account (or your user account if you only have one set up like me) home directory, then documents. Create a new folder called 'Scripts' and in there name the file filespace.sh - make sure there is no .txt extension appended. If one is, navigate to the file, command + i on it to get info and remove .txt from the extension.

You should now have a file called 'filespace.sh' in that folder.

------
EDIT:

You will notice that we have an application called RefreshFinder.app now. This solves a complication whereby when you completed the set of instructions here, you would have to click Macintosh HD to show the updated file space. Not exactly very good huh? Still, if you did none of this and clicked Macintosh HD it still wouldn't show the updated disk space so it did fix that.

The RefreshFinder.app is an AppleScript program that is tremendously simplistic, it merely tells Finder to refresh all the icons on the desktop, so that macintosh HD will refresh as well, and thus show the update disk space sitiuation without you having to click it.

Just make sure the RefreshFinder.app is where you refer to it in the shell script, or in the Scripts folder in Documents that you have been instructed to make.

--

Go back to terminal and type:

cd /users <ENTER>

This will go back to the root (macintosh hd) and then change to the users directory. Then do the same but to cd into your user's directory name e.g: my user short name is 'vicky' so I then type:

cd vicky/documents/scripts <ENTER>

If my user's short name was 'Ernie' I'd do cd ernie/documents/scripts.

Now at the prompt type:

chmod 777 filespace.sh

What this does is turn that text file into an executable script. A script is just a file containing a sequence of commands to execute so you can do certain actions withoiut having to type one line at a time. The '777' part is an octal number which basically gives all the permissions we need for the script to be executable in the UNIX/BSD environment.

Ok, if this is all new to you, breathe in and out - you're doing well. To test this, open Macintosh HD, so its visible with the terminal too, and type:

/users/vicky/documents/scripts/filespace.sh <ENTER>

You should see the file update.txt appear and disappear very quickly. If you see '-bash: /users/vicky/documents/scripts/test.sh: Permission denied' the chmod went wrong. If the script fails, check what you typed into TextEdit and saved as filespace.sh is a verbatim copy of what I wrote above.

OK, good news, we're almost there!

In terminal:

cd /etc <ENTER>

it's a hidden folder, this is the stuff that OS X Finder really wants to keep away from you, for good reason, most users don't need it, most users don't even know that it is there!

Now to summarise, what we want to do is run that filespace.sh script every minute for this user, show that the Show Item Info updates to reflect space being consumed or being made due to file operations, to do this we edit something called our crontab file. This file contains a list of things that we want to execute (or run) at certain points of the day, I won't elaborate too much on cron - but if you type in cron help or something in google you'll get an idea. Essentially it runs tasks on a schedule as per its crontab file.

Now by default only the root user can change this and most Mac OS X setups do not have root enabled, it's disabled by default, so even an admin user trying to change things here will be told to sling their hook. So we use a command called 'sudo'. The root user is also know as the superuser, and sudo stands for 'superuser do'. Basically it allows us to do things as the superuser without being logged in as such.

So firstly, we back up the crontab file in case we mess things up. To do this we do:

sudo cp crontab crontab.bak <ENTER>

You will be asked for a password, enter you user name's password.

Now we are very close to getting there, we wish to edit this crontab file and tell the system run filespace.sh every minute please. So we use a UNIX text editor called pico - it's friendly compared to most :flower:

So type at the prompt:

sudo pico crontab <ENTER>

You will see it currently contains:

# The periodic and atrun jobs have moved to launchd jobs
# See /System/Library/LaunchDaemons
#
# minute hour mday month wday who command


Move the cursor to the end of the line with command, press enter for a new line and type:

* * * * * vicky /users/vicky/documents/scripts/filespace.sh

PLEASE NOTE : the spaces between the asterisks MUST be there, there is a space before the user name and as space after! :flower:

The asterisks mean merely 'every' so following the format shown this means EXECUTE for the USER vicky, the SCRIPT /users/vicky/documents/scripts/filespace.sh EVERY minute, hour, certain day of the month (eg: the 1st), on every month of every week day. In other words - every minute we are logged in. So all you need to change is the user name from 'vicky' to your short user name and likewise your user name in the path to the filespace.sh script.

When you have done this, press and hold Esc, and press O twice. so ESC (Hold), O, O - release all keys.

Press <ENTER> to accept the crontab name. If it says permission denied, you probably typed pico crontab instead of sudo pico crontab.

To quit pico, press and hold ESC, x, x - release. Pico will quit.

Done :flower:

Now on the minute, every minute, update.txt will be made in the root/Macintosh HD folder, and deleted and with it, the Show Icon Info will be updated too.

A kludge, but a fix, and a good one till Apple fixes it. At least it solved my problem :flower:

Any questions please ask - I tried to make this as simple as possible. You can of course save the filespace.sh wherever you like, even /bin (remember to use sudo!) and write filespace.sh in pico itself.

Also - you will have to do this for every user too in the crontab file; and in this instance it begins to make sense to save the file in /bin.

Hope this helps!

Vicky :flower:
Attached Files
File Type: zip Refresh Finder.zip (17.6 KB, 6 views)
QUOTE Thanks
inflexion

 
inflexion's Avatar
 
Member Since: Jan 12, 2005
Location: /home/sheffield/UK
Posts: 1,278
inflexion will become famous soon enough
Mac Specs: 12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle

inflexion is offline
Vicky your a total darling

im more than fine bashing away in terminal (get it? yea crap joke i know) so its working great thanks.

Thanks once again as its been of of those little things that annoys me so much, also the guide holds your hand alot so those who have never used the terminal before should be fine and thos like me that have compiled programs in linux should find it a walk in the park



Apple, think different
QUOTE Thanks
lil
Guest
 
Posts: n/a

Bad news - what I originally wrote above seems to not work without clicking the Macintosh HD icon. BUT without any of the above, clicking Macintosh HD icon won't refresh it at all.

So with this in mind, I have edited the above, and attached a very very simple AppleScript application to refresh the finder desktop icons!

Now it will work a beauty :flower:

Only to glad to be of assitance, we both gained something out of this!!

Vicky
(off to edit original post with fix)
QUOTE Thanks
lil
Guest
 
Posts: n/a

Update posed with an attachment.

The AppleScript app for the curious is:

try
tell application "Finder" to update items of desktop
end try
QUOTE Thanks
lil
Guest
 
Posts: n/a

Quote:
Originally Posted by inflexion
Vicky your a total darling
Hehe, thanks :flower: Here to help!

Quote:
Originally Posted by inflexion
im more than fine bashing away in terminal (get it? yea crap joke i know) so its working great thanks.
grins Make sure you adjust for the few changes I made, now makes it seemless and perfected. The reason I use Macs is because I hate it when things don't work as they should, and 99.9% the Mac fulfils this, and hence - I will never use Windows, too many imperfections and annoyances!

That's why I had to fix this, as it annoyed me too.

Quote:
Originally Posted by inflexion
Thanks once again as its been of of those little things that annoys me so much, also the guide holds your hand alot so those who have never used the terminal before should be fine and thos like me that have compiled programs in linux should find it a walk in the park
I'm glad you feel it is pitched about right, I didn't just want to write do this do that, because beginners won't learn anything in the process. It is by learning and curiosity I got to where I am today, and I believe others can too.

After all, my erstwhile job at the AppleCentre was to help people, and thankfully I'm not just the blonde who can read a tech spec sheet :flower:

Vicky
QUOTE Thanks
macAttack

 
macAttack's Avatar
 
Member Since: Apr 23, 2005
Location: Cape Cod, MA
Posts: 1,509
macAttack is a jewel in the roughmacAttack is a jewel in the roughmacAttack is a jewel in the rough
Mac Specs: iBook

macAttack is offline
thank you vicky!!!!
QUOTE Thanks
lil
Guest
 
Posts: n/a

Quote:
Originally Posted by macAttack
thank you vicky!!!!
No problem, a pleasure to help :flower:
QUOTE Thanks
inflexion

 
inflexion's Avatar
 
Member Since: Jan 12, 2005
Location: /home/sheffield/UK
Posts: 1,278
inflexion will become famous soon enough
Mac Specs: 12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle

inflexion is offline
vicky the original fix you wrote worked fine for for me, it just updates after a minute like it should or where you on about your script?



Apple, think different
QUOTE Thanks
lil
Guest
 
Posts: n/a

If it works then don't fix it :flower:

For some reason it decided to 'not work' 100% correctly, so I wrote the AppleScript bit into it to make it fool proof :flower:

That way it will definitely work.

Vicky
QUOTE Thanks
inflexion

 
inflexion's Avatar
 
Member Since: Jan 12, 2005
Location: /home/sheffield/UK
Posts: 1,278
inflexion will become famous soon enough
Mac Specs: 12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle

inflexion is offline
naa thats cool then, if it helps i noticed that you never write documents in the paths with a capital D maybe thats why it dont work?



Apple, think different
QUOTE Thanks
lil
Guest
 
Posts: n/a

maybe... but I always took it to be case-insensitive, we'll see :flower:

I'll play with it more tomorrow, just rounding off some PHP code right now hehe

Vicky
QUOTE Thanks
inflexion

 
inflexion's Avatar
 
Member Since: Jan 12, 2005
Location: /home/sheffield/UK
Posts: 1,278
inflexion will become famous soon enough
Mac Specs: 12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle

inflexion is offline
hmmm im not too sure being a linux and java kid first i learnt the hard way about case sensitivity so i stick with it now, plus i cant live without the tab key when using Terminal.

as for PHP no thanks ill leave that to you



Apple, think different
QUOTE Thanks
lil
Guest
 
Posts: n/a

Hehe, well once a C programmer, always a C programmer

You can set the Mac OS to format its volumes as case sensitive so that

cd /users/vicky/documents

would fail until you did cd /Users/vicky/Documents

But I prefer case insensitivity, saves a lot of headaches. (Think late at night, 1000 line long terminal script, and it breaks somewhere, and you're looking for the one rogue capital or small letter hehe!)

As for the tab key, I expect this may explain why I don't tab-complete in IRC.

Guess that makes me a masochist or stupid :flower:

Stupid I think hehe :flower:

Vicky
QUOTE Thanks

Post Reply New Thread Subscribe


« Renaming Home folder | Your startup disk is almost full. »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Image rotation destroys EXIF info -- help! djmitch Images, Graphic Design, and Digital Photography 5 09-10-2005 06:52 PM
multiple items info MAC-simus OS X - Operating System 2 07-20-2005 12:35 PM
Leo Laporte announces Mac Show iWhat Schweb's Lounge 1 06-16-2005 09:10 PM
How do I get iTunes to show track number? n0r1 OS X - Apps and Games 1 03-31-2005 06:06 PM
Getting images to show up in Dreamweaver dziner Web Design and Hosting 4 07-22-2004 04:11 PM

All times are GMT -4. The time now is 07:25 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?