1

Is there an alternative for the skill -KILL -u $user command on the Mac OSx. The basic requirement is I want to log out my current logged in user at end of shell script

This program logs out Linux log in user .

  • Do you want to log out/exit from the shell you are running in or log out the user from Finder? – nohillside Apr 5 '14 at 16:27
1

From the man page of skill

These tools are obsolete and unportable. The command syntax is poorly defined. Consider using the killall, pkill, and pgrep commands instead.

so you could use pkill -KILL -u uid.

But why kill every process with the KILL signal? You can just call exit after your script:

script.sh ; exit
  • I think you left a k out of pkill – dwightk Apr 5 '14 at 14:08
  • The above command is not working in OS X 10.9 :( – prateeak ojha Apr 7 '14 at 13:03
  • @prateeakojha the pkill command? Do you get an error message? What are you exactly doing? – Matteo Apr 9 '14 at 7:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .