Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
bankshot said:
No need to go writing a shell script when a simple command will suffice:

Code:
sudo find . -type f -exec chmod 666 {} \; -print

For the folders, use -type d (d for directories) and mode 777.

That said, the Unix security alarms in my head are going off like mad looking at these permissions. :eek: :p My inclination would be to create a group that includes all the users who need to access the music files, change all the files/directories to be owned by that group, and make the permissions 664 (or 775 for directories). Left as an exercise for the reader unless you seriously want to try it. Then I'll be happy to go into more detail. ;)
Thanks for that bankshot - I didn't know the good old find command could do that.
 
open -a is awesome. Thanks. I love anything that will let me do more from my keyboard since it seems more efficient to me.
 
i found out that the easist way to create my "itunes library fix"
was to write in the commands i needed in Text edit file (i called it itunesfix)and run >chmod 755 on the file,
i moved the file to /bin/ and now the users have to type "itunesfix" in terminal and then the folders get 777 permission (rwxrwxrwx) and the mp3s get 666 (rw-rw-rw)! :D

anyway the open -a (and open e is nice!!)
i entered in the Terminal:
>alias o="open -a"
then i only have to type
>o "appname" to open apps!! :D
 
mms said:
open -a is awesome. Thanks. I love anything that will let me do more from my keyboard since it seems more efficient to me.

It doesn't just seem more efficient - once you learn good keyboarding as well as useful commands, it truely is more efficient than the mouse for most tasks.

I once saw a device that had 4 piano-like keys - invented by one of the guys who initially worked on the Mouse as well - that was intended to be used as modifier / command keys in conjunction with the capabilities of the mouse. This would truely speed the abilities of the user - if it weren't for the freakin' learning curve!

As for my contribution to the "useful commands" - actually, my best offer is a script:

Code:
#!/bin/bash
kill `ps aux | grep $1 | grep -v grep | awk '{print $2}'`

Pop that baby into a text file (named "killapp" or whatever you like), chmod +xr it, and stick it somewhere in your PATH (like /bin or /sbin). Now you can use the command "killapp Explorer" to finally kill Internet Explorer! It's your very own command line Force Quit, without the dialog box.

-rand()
 
rand() said:
kill `ps aux | grep $1 | grep -v grep | awk '{print $2}'`
i was working on a unix project once, we used a command similar to this. but there was one guy for whom it never worked.

it took a while to figure out, but what was happening was, due to the way the sysadmins made usernames, his username contained the string "grep", so _all_ processes belonging to him were getting stripped out.

my favorite alias:
alias k 'cd ..'

very simple, just used for moving to the above directory. but it's intuitive for vi users, since that's the key command to move up a line.
 
zimv20 said:
it took a while to figure out, but what was happening was, due to the way the sysadmins made usernames, his username contained the string "grep", so _all_ processes belonging to him were getting stripped out.

That's really funny, in the geekiest sense of the word. :)

In that case, you could make it a bit more string specific, like perhaps "grep " or " grep" just to throw that extra 'error-check' space in there.

-rand()
 
Another Terminal Question

I've done astronomy research on a sun machine, so i sort of know what's going on with basic commands and scripting....

my question is that whenever i'm using the terminal (or X11) and want to edit a file, and use the & to get it to open a new window it just hangs...

it would be nice to open a new terminal session to edit something without losing the original terminal window...

any ideas???
 
Trying to open a new window and backgrounding the process (using the &) won't work in Terminal.app. It's not X11 and won't open unix binaries like that. But it should work just fine in an X11 xterm, I guess it depends on which text editor you're talking about. emacs? Unless you replaced the emacs that came with darwin, that's not an X-version.
 
Bu88a said:
it would be nice to open a new terminal session to edit something without losing the original terminal window...

any ideas???
as mentioned, putting the process in the background won't accomplish that.

get used to operating w/ two windows (at least). one in which to edit, the other to do command line operations.

the pwd command is useful here. you can copy the directory you're in, then cd to it in the new window with the paste. if you've got a Finder window open to that folder, you can:
1. type cd in the terminal window
2. follow it with a space
3. drag the folder you want to go to into the terminal window
4. after the full path of the folder is displayed, hit return
 
Darbydoggy said:
Thanks again to everybody. I found the OSXFAQ site late last night and will be reading through it. Apple users are the best!!

lol.. actually most of the ones i've talked to have been elitists ;) good at knowing stuff but not good at understanding others don't know it already :-/ quite a few on here seem to be pretty helpful though which is rather useful
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.