Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Killing GUI apps and deleting hidden files

Killing GUI apps and deleting hidden files
Thread Tools
MonitorFlickers
Fresh-Faced Recruit
Join Date: Dec 2005
Status: Offline
Reply With Quote
Dec 16, 2005, 02:44 PM
 
I'm a bit new to UNIX under OS X, but have been teaching myself to use the bash shell. I'm confused about a few specific things and am having trouble finding an answer. Can anyone help answer these two questions for me?

1) is there a way by which I can kill all GUI apps, including the finder, and work on my mac in a simple bash shell with no other GUI apps running? I know how to boot into single user mode but I was under the impression that this is different than a typical bash shell when I'm logged in under my account name.... ?

2) A scan for hidden files on my desktop revealed a large, temporary StuffIt file that apparently got left there during a crash. However whenever I try to RM it, it tells me the file or directory doesn't exist. I've typed it every way I can think of, enclosing the weird name in quotes, copying the full name straight from the LS output, and also I tried putting a backslash in front of all the spaces... but somehow I can't get the RM command to see the file I'm trying to point it to, and since it's invisible I can't drag it to the terminal either. Any other ways to reference a file outputted by LS? perhaps numerically piping it into RM?

Thanks in advance for the help!
     
Tesseract
Grizzled Veteran
Join Date: Apr 2002
Location: california
Status: Offline
Reply With Quote
Dec 16, 2005, 03:31 PM
 
1. You can't "kill the GUI" per se, but you can log in to a command-line only console. Enable the username/password login screen in System Preferences, log out, and enter '>console' into the username field of the login window. You should get a textual login prompt.

2. That's weird. Try rm -f or sudo rm.
     
MonitorFlickers  (op)
Fresh-Faced Recruit
Join Date: Dec 2005
Status: Offline
Reply With Quote
Dec 16, 2005, 04:08 PM
 
Originally Posted by Tesseract
1. You can't "kill the GUI" per se, but you can log in to a command-line only console. Enable the username/password login screen in System Preferences, log out, and enter '>console' into the username field of the login window. You should get a textual login prompt.

2. That's weird. Try rm -f or sudo rm.
Thanks for the tip, I'll try that out. Will that drop me into a bash shell or is it simply an alternate way to login to the Finder? I need to run my mac via the command line without the finder or even the terminal's GUI running.

As far as the second question, I actually know those won't work because it's not a matter of file permissions, the error that I'm getting is 'no such file/directory exists'. It can't even see which file I'm trying to name, even though every LS command clearly prints out that file. And it's not a symbolic link or anything like that, it's a simple temp data file hidden on my desktop. It has two $ symbols which I thought might throw off the bash shell but I've tried putting the filename in quotes when I type it into RM... still no luck.

any thoughts?
thanks again for the feedback, much appreciated!
     
MonitorFlickers  (op)
Fresh-Faced Recruit
Join Date: Dec 2005
Status: Offline
Reply With Quote
Dec 16, 2005, 04:14 PM
 
My apologies. I just realized a recent thread asked the same question as my first one. I'll check there for the answer about the shell.

Still wondering about the weird file problem tho...
     
Tesseract
Grizzled Veteran
Join Date: Apr 2002
Location: california
Status: Offline
Reply With Quote
Dec 16, 2005, 04:38 PM
 
The '>console' login will give you a plain login shell, no GUI running.

Did you use single or double quotes? (Try single if you haven't yet.)
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Dec 16, 2005, 04:59 PM
 
Originally Posted by MonitorFlickers
2) A scan for hidden files on my desktop revealed a large, temporary StuffIt file that apparently got left there during a crash. However whenever I try to RM it, it tells me the file or directory doesn't exist. I've typed it every way I can think of, enclosing the weird name in quotes, copying the full name straight from the LS output, and also I tried putting a backslash in front of all the spaces... but somehow I can't get the RM command to see the file I'm trying to point it to, and since it's invisible I can't drag it to the terminal either. Any other ways to reference a file outputted by LS?
Try getting the shell to complete the name by hitting tab. If you can get the first couple of letters right, that should do it. Otherwise, I would do "rm -i *", which will try to delete every file in the folder, but ask before deleting each one. Then you'd only say yes to that file.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
MonitorFlickers  (op)
Fresh-Faced Recruit
Join Date: Dec 2005
Status: Offline
Reply With Quote
Dec 16, 2005, 05:51 PM
 
Originally Posted by Chuckit
Try getting the shell to complete the name by hitting tab. If you can get the first couple of letters right, that should do it. Otherwise, I would do "rm -i *", which will try to delete every file in the folder, but ask before deleting each one. Then you'd only say yes to that file.
You rock!

thanks.
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Dec 28, 2005, 09:32 AM
 
Single user mode is different from normal shells as you don't have multiple shells open; its intended use is for maintenance only where other applications might interfere (e. g. for fsck).

If you want to kill gui apps, I would either use Activity Monitor (located in /Applications/Utilities) or you can also look up the process id with something like ps -aux | grep blabla or top | grep blabla and then kill it with kill pid-of-blabla.
I don't suffer from insanity, I enjoy every minute of it.
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Dec 28, 2005, 11:43 PM
 
Originally Posted by MonitorFlickers
1) is there a way by which I can kill all GUI apps, including the finder, and work on my mac in a simple bash shell with no other GUI apps running? I know how to boot into single user mode but I was under the impression that this is different than a typical bash shell when I'm logged in under my account name.... ?
You could just maximize your Terminal.app window... Or how about enabling SSH (it's called Remote Login in the Sharing preferences pane of System Preferences) and connecting from another machine? That's pretty minimal.

"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
darkhero168
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 6, 2007, 11:41 AM
 
i am having the same problem as your second case. However, it doesn't show up in terminal for some odd reason. I noticed the stuffit folder through one of my bit torrent clients on my desktop. I was able to create folders in it through the client but i cannot delete or find them otherwise....

i tried to run "rm -i *" through terminal on the desktop but the folder did not show up...
     
darkhero168
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 6, 2007, 11:48 AM
 
nevermind. i just used tinkertool to show hidden files and got rid of it there.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 03:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,