OS X Technologies :: Command That Works In Terminal Not Running As Launch Agent
Apr 11, 2012
Trying to run the following command as a Launch Agent (OS X 10.7): /usr/bin/find /Users/username/Documents/Dropbox/Public -type f -mtime +2 -print0 | xargs -0 rm -rÂ
Created a plist file (reproduced below) and saved to ~/Library/Launch Agents, but the command isn't executed either at the specified time or when the agent is loaded via launchctl. If I change the command to a simple Applescript test: osascript -e 'tell Application "Finder" to display dialog "hello"'Â
It runs correctly as a launch agent when loaded and as the specified time Which means there's something wrong with the first command (find). But the command runs as written when executed manually in the terminal. Â
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
I've use a terminal command to create a SOCKS proxy through my ssh server (ex. ssh -D 2008 -l user server.here), to which I am then prompted to enter a password, and everything is connected. For the sake of ease of use (as I need to do this frequently), is there any way I can make a dock icon, or something along those lines, so I can just click it, it runs the command, I enter a password (or maybe even not?) and it's all set? I have tried setting up a workflow in automator to run a shell script, but it is unsuccessful, leaving me with "Run Shell Script failed: Pseudo-terminal will not be allocated because stdin is not a terminal."
Simple request and for some reason my google-fu is failing me. How do I change the volume (drive not audio) in the Terminal app in OS X. I am using SL.
Is there a command to clear the terminal screen that works like 'cls' on Windows? I know about 'clear', but clear just moves the prompt on the top of the screen, leaving the previous output visible if I scroll up.
A friend suggested 'clear_console' (I think he's on debian) but I can't find it on OS X or MacPorts.
I want to build a redboot kernel in a wireless router, the command required from my newly acquired knowledge is insmod and modprobe.
However from the mac 10.5.8 terminal it says that the command is not found. I have installed gcc , sdk compiler support and enabled the super user as well.
I want to run some terminal commands fairly often... yet I don't want to have to type them. I just switched from windows, so I need some help as to how to do this.
In windows I would've just used a batch file to run command prompt commands. I need something that will let me just run it and it will automatically run the commands.
I can use the Control>C command to quit that and return to normal. But it's a waste of time and I can't seem to figure it out. A Genius Bar Genius said to Archive and Install, but I don't think it's necessary. I just want to know how I can find whatever it is that's screwing it up.
I can't seem to run a sudo command in the OS X terminal. Every time I run a sudo command, I get no response, as if the command is not run at all. My sudo appears to be broken somehow. I've got a problem with mounting an NTFS drive that is dirty. I have a command I am trying to run using the "sudo" command, but it is not working.
Code: sudo /usr/local/bin/ntfs-3g /dev/disk0s3 /Volumes/WIN XP -o force
After the sudo, I am prompted for my password, but after that the only response I get is another prompt, as if the command was totally ignored. I have tried many different commands after the sudo, and cannot get a response from anything. I even tried "sudo tcsh", which should open up a new shell, but nothing. "sudo ls" also shows nothing, just another prompt.
What is the best way to run a terminal command when logging in? And by �best� I mean �fastest.� I�ve been encapsulating my commands in an Applescript, but it�s terribly slow to load, and I�m hoping there�s some UNIX back-end I can use to speed things up.
Specifically, I want to run a shell script that I wrote. It decrypts some folders inside my Home directory so I can use them (this part works seamlessly, I just need it to auto-run itself).
If you launch iTunes while holding the option key, itunes will allow you to access multiple libraries.
I want to be able to achieve the same effect with a shell command.
Is there a way to launch itunes from shell in a way that will give it the same instructions that it gets when you hold down the option key and open it from finder?
You'd think this was all pretty basic. It probably is.
I'm trying to open/edit '/usr/local/php5/lib/php.ini' with TextWrangler through Terminal. The TextWrangler part isn't an absolute requirement. The directory exists and I'm assuming the file does as well. (No 404-esq errors during my fumblings and it was a standard installation of PHP5)
Also, is there any way to browse through the above directory using the Finder's GUI? That would be nice.
I need to erase a disk I bought with NO formatting. I shouldn't have initialized it when I connected it, and now I need to erase it but do NOT want to format it.
I've been trying to use diskutil eraseDisk %noformat% /dev/disk1
Like the diskutil eraseDisk instructions tell me to, but it won't take.
I used to know a command that would show all of the ip address and the name of the devices on your network. I have not use the command in a while and I forgot it.
Just bought a new MacBook Pro yesterday and I'm having trouble getting Time Machine to work with my NAS (WD My Book World Edition which supposedly supports Time Machine after their last firmware update). Time Machine sees it and starts writing to it but then stops recognizing the external NAS drive even though it's still connected to the network and I can access it and its files through the Finder.
So I did some Googling and came across this article and this command line...
I was frustrated with Google Chrome quiting whenever I accidently pressed command q, so I tried out some terminal commands I found online. One was defaults write NSGlobalDomain NSUserKeyEquivalents '{"Quit Google Chrome" = "@Q"; "Preferences..." = "@;";}' I don't know what the other was. They stopped chrome from quiting with command q, but now I can't quit chrome AT ALL. Is there a way to undo everything I've ever done in terminal? I should not be touching it...
While doing a fresh install of Snow leopard, we go through the language selection screen and then the utilities screen come up - From the utilities screen, we can launch "terminal".
Is there a way to bypass the above steps and directly launch terminal or any other app, when we begin the installation process? Is there any way to pass parameters to Snow Leopard bootloader during install process?
Is there a terminal command that will display your external IP address? ifconfig and netstat only seem to report my local/network address, so I've been using curl and awk to parse [URL]. But I'd prefer a way that doesn't rely on an http call. Not to mention that my method will fail if/when dyndns changes the format of that page.
I've just tried following this tutorial. Code: [URL]. After entering the Terminal command I restarted the dock using. Code: killall Dock. And apparently that was supposed to restart the dock, however it's killed mine and it will now not start at all. Any ideas on a Terminal command or other way(s) I can get my dock to show again?
I'm trying to create an automator that will open safari, enable private browsing, go to my site, and log myself in. The problem is I need a terminal command line that will ensure private browsing is enabled.
I'm looking to change some of the OS X default sounds (like the very annoying "boing!" drag-and-drop sound). I'm not talking about the alert sound that can be changed easily via the "Sound" function in System Preferences. I'm looking for the Terminal commands that would enable me to substitute an existing Mac OS X sound for the ones I don't like. (I'm not looking to create or find online other sounds; I'm happy to just use the ones that come with Mac OS X.) Some weeks ago I found a web page that described the necessary terminal commands and also where to find the .aiff files, but I've spent the last week trying to find that page again with no luck.
What is the terminal command to get the usage of each cpu core? I have tried top command but its return only overall cpu usage and also cpuwalk.d command based on the process.
Run in the terminal inside the make command, prompt:"-bash:make:command not found" My system version is Mac OS X 10.7.3 Xcode Version is 4.3. How to execute make Command?
There is a possibility that there is something amiss with my external hard drive. I have ejected the hard drive and read in a thread that there is a way to disable TM's continuous "local Snapshots" Backup with a command typed in Terminal. The reasoning is that TM uses a lot of CPU's? and things can become a bit sluggish. If I turn TM to "OFF", doesn't this stop the hourly snapshots on the INTERNAL hard drive?Â