1
vote
1answer
41 views

skill -KILL -u $user Command on Max OS X?

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 ...
0
votes
0answers
21 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
0
votes
1answer
53 views

What is the proper way to use the cut command on ps command output

This question is related to a question I posted on rogue firefox procesess. It relates to firefox processes following image uploads that I have been having for a while. I am trying to get to the ...
1
vote
2answers
83 views

How to make a message appear on the screen?

I'm trying to set up a kind of intercom system between Mac, Windows, and Linux boxes at home. Question: How can I make an arbitrary message appear on the graphical screen of Mac OS X? For instance, ...
0
votes
2answers
2k views

How Do I Use 'cp' to Overwrite Files?

Using a shell script or Terminal, how do I overwrite files that may or may not be present. I looked at man page for cp, it said use the -f argument to force overwrite. But, it does nothing. $ cp -f ...
1
vote
3answers
1k views

Find/Unrar/Delete Script

I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more. My need: I need to be able to scan a folder, find any .rar files, extract the ...
2
votes
3answers
819 views

How to determine the absolute path to a file in a shell script

I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files. I need a fail-safe way to turn all those passed paths into absolute ...
1
vote
2answers
1k views

Display dialog from command line (like xmessage does)

Background I'd like to be able to display a notification window in OS X from within a script. The script will be running in background, so the notification should not go to the terminal but instead ...
11
votes
2answers
4k views

What is the difference between .command, .tool, and .sh file extensions?

I saw a couple of questions about executing command line scripts? I saw that the .command and .tool extensions were mentioned. I have always used .sh. What is the difference between these different ...
4
votes
1answer
14k views

How do I remove a user via single user mode in 10.7?

I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
7
votes
6answers
6k views

How to send an email from command line?

How to send an email from command line or script? I want to be able to run the script programmatically by passing the receiver and the message.
3
votes
1answer
458 views

Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?

I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my sips (or Finder) got broken afterwards or I ...
17
votes
5answers
5k views

How can I change a file or folder icon using the Terminal

How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?