or Connect
AppleInsider › Forums › General › Genius Bar › Making A Folder Or File Invisible
New Posts  All Forums:Forum Nav:

Making A Folder Or File Invisible

post #1 of 21
Thread Starter 
How can I make a folder invisible? Is there a CLI command I can do? Thanks.
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #2 of 21
Do you have the Dev tools installed? There's a command hidden in there (/Developer/Tools/SetFile) that will let you do it.

To get it to go, type "/Developer/Tools/SetFile -a V filename"
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #3 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
How can I make a folder invisible? Is there a CLI command I can do? Thanks.

mv filename .filename

adding a "dot" at the beginning makes it invisible in the finder.
post #4 of 21
http://www.apimac.com/sf/index.html

Secret Folder by Apimac. Haven't used, never heard of it, but noticed it today on macnn.
post #5 of 21
Thread Starter 
Quote:
Originally posted by torifile
mv filename .filename

adding a "dot" at the beginning makes it invisible in the finder.

That doesn't work... mv is the move command...
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #6 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
That doesn't work... mv is the move command...

I know what it is.

And it does work, I've tried it. And the mv command is actually a cp and rm command in one. It works to rename, too. Make sure you put the trailing slashes after the folder names.

edit:

Quote:
In its first form, the mv utility renames the file named by the source
operand to the destination path named by the target operand. This form
is assumed when the last operand does not name an already existing direc-
tory.

man mv - please read before telling someone they don't know what they're talking about.
post #7 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
That doesn't work... mv is the move command...

Yes, it does work.

mv renames files too. If you rename a file to have a dot '.' in front of it, the file is then invisible to the Finder and other GUI apps.

edit: damn, beat by torifile again.
post #8 of 21
Quote:
Originally posted by Brad
edit: damn, beat by torifile again.

post #9 of 21
Thread Starter 
I did mv /sw .sw all that did was erase the folder... Luckily I only need it to keep my Terminal.app happy... I doesn't work for me.
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #10 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
I did mv /sw .sw all that did was erase the folder... Luckily I only need it to keep my Terminal.app happy... I doesn't work for me.

Reading problem tonight? I said make sure you have the trailing slashes. Sheesh.
post #11 of 21
Thread Starter 
Meaning like this:

mv /sw /sw .sw

What do you mean exactly?
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #12 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
Meaning like this:

mv /sw /sw .sw

What do you mean exactly?

No. If your directory is called "foo" and you're in the directory that contains the folder foo, you do mv foo/ .foo/


So you would do mv /sw/ /.sw/


Sorry I wasn't clear.
post #13 of 21
Thread Starter 
Quote:
Originally posted by torifile
No. If your directory is called "foo" and you're in the directory that contains the folder foo, you do mv foo/ .foo/


So you would do mv /sw/ /.sw/


Sorry I wasn't clear.

OKay I did that and here's what it tells me:

Gaspar-Hellers-Computer:/ gasparhe$ mv /sw/ /.sw/
mv: rename /sw/ to /.sw/sw/: Directory not empty

What now?
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #14 of 21
Quote:
Originally posted by Proud iBook Owner 2k2
OKay I did that and here's what it tells me:

Gaspar-Hellers-Computer:/ gasparhe$ mv /sw/ /.sw/
mv: rename /sw/ to /.sw/sw/: Directory not empty

What now?

That's a good question. I just did it myself with a directory full of stuff. Anyone with any ideas?
post #15 of 21
mv /sw /.sw

mv = move
/sw = source
/.sw = destination

You shouldn't be using trailing slashes.

This assumes there is something already named "sw" at the top level of the drive.
post #16 of 21
Thread Starter 
Quote:
Originally posted by Brad
mv /sw /.sw

mv = move
/sw = source
/.sw = destination

You shouldn't be using trailing slashes.

This assumes there is something already named "sw" at the top level of the drive.

I did exactly what you said and it still says:

Gaspar-Hellers-Computer:~ gasparhe$ mv /sw /.sw
mv: rename /sw to /.sw/sw: Directory not empty

-_- Could you please ssh into me and do it for me?
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #17 of 21
Nooooo!

Don't do this!!!

Renaming sw will completely mess up all your fink paths, and such.

If you don't like my SetFile suggestion, then edit the .hidden file on the root of your hard drive. It's really easy. Just open it in an editor like BBEdit (since it can open invisible files) or a terminal editor, and add sw to the end of it. Make sure that there is still a trailing carriage return, though.

Once you relaunch the finder, the new changes take effect.

If you want, I could even ssh for you, or vnc so you could see what I am doing.
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #18 of 21
Thread Starter 
Quote:
Originally posted by bauman
Nooooo!

Don't do this!!!

Renaming sw will completely mess up all your fink paths, and such.

If you don't like my SetFile suggestion, then edit the .hidden file on the root of your hard drive. It's really easy. Just open it in an editor like BBEdit (since it can open invisible files) or a terminal editor, and add sw to the end of it. Make sure that there is still a trailing carriage return, though.

Once you relaunch the finder, the new changes take effect.

Heh. I don't really have fink installed... I only have the bin and etc directories with init.sh and fink.conf. I only have it there to keep Terminal.app happy.. It would otherwise complain that it can't find /sw/bin/init.sh. Don't worry. I wouldn't be doing this if I had a working fink installed. I've been having problems with it lately....
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #19 of 21
Of course, you'd be messing up the paths to these .conf files then, too.

My way is better...
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #20 of 21
Thread Starter 
Quote:
Originally posted by bauman
Of course, you'd be messing up the paths to these .conf files then, too.

My way is better...

Again I only have it there so Terminal.app doesn't get on my nerves with the constant "/sw/bin/init.sh Directory not found" message...
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
http://www.angelfire.com/anime5/erro...amxsigflat.jpg
Above is a link to my sig pic.
If you'd like to send me an email please use gheller@hellermedia.com. The email listed in my profile is for...
Reply
post #21 of 21
Right, and putting a period in front of the sw folder will still cause the error to show up.

It's looking for a folder named "sw", not one named ".sw". There is a significant difference... it's not just appearance that you're changing.

You could rename the folder, and then go into your terminal configuration files and change the paths to ".sw", adding a period everywhere you have a path through the sw folder.

Or, you could just use the .hidden method or the SetFile method. Both work nicely. Both cause zero side effects. Both make it invisible. Your terminal will find /sw, and you won't get any more errors, and have a nice, clean root drive.

Putting a period in front of sw will make it invisible, but it will NOT fix the errors.

Capiche?

[Edited to make my post sound a bit less hostile... it came off a little strong ]
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Genius Bar
AppleInsider › Forums › General › Genius Bar › Making A Folder Or File Invisible