Software :: Reading Plist Files From Command Line?
Apr 18, 2002
Can anyone tell me if there is a command line tool to read values out of plist files? I'm trying to write a script to automate installing the Balthisar Ghostscript Network Printer package, and I want it to check the version of the LPR module before replacing it. I wanted to do something cleaner than just parsing it's Info.plist file in perl.
I'm not talking about a tool like Onyx, which is "excellent". Definitely the best, most simplest maintenance tool/utility.app for the Mac.I'm talking a simple tool for searching, editing and deleting both specific .plist files and cache files on an app-by-app basis. Is there one?I know of PrefEdit, but that is only for .plist (preference) files, and leaves out cache files:
I need, well desperately want; one that does both.Yeah I could use AppZapper, but I would prefer something that is designed for this specific purpose. Anyone?
Trying to install a .pkg from the command line in single user mode. I'm using the command "installer -pkg Installer.pkg -target / The .pkg is on a mounted USB drive. / is also mounted. When I run the command, the screen scrolls to a new blank line and stays there but nothing happens. The light on my USB indicates no data transfer is happening. I get no output, even if I add -verbose to the command.
I read somewhere that memtest can be used to test the memory of your mac. I tried it and it didn't even know what memtest was. Is there a way to test the memory in the unix shell?
I want to have the value of the batch command find. I've written the following but it don't work. Perhaps I'm missign something. if [ find /Applications/Autonome/test.log = 0 ] ; then echo "file not found !"
im trying to display "Monday | November 15" and I have "date +%A" to display the weekday, "date +%B" to display the month, and "date +%d" to display the date number.. but somethin like "date +%A | date +%B date +%d" doesnt work.. I know I can create 3 shell boxes to do this, but I rather learn for the future so how do I do this all at once?
so i found pmset for managing power management from the commandline, and it's great. my question is, is there a similar command for controlling the screensaver? all i really want to do is turn it off (or on) remotely.
I cloned a clean 10.5 image over to my main hdd with superduper!. After that I get ugly text commands displayed on my screen when rebooting. I haven't done anything to enable this, not that I know of. How can I disable this? Worst case, maybe my MB is broken?
A good friend who has used Macs professionally for years has asked me to send him a big stack of HTML documents and my instinct is to put them into a tarball, b2zip it, and send him that. I asked whether he could handle it and he told me to send each document separately, uncompressed. I use Linux, so I know you folks have an excellent OS that is BSD-based and can handle lots of bash commands I use. Accordingly I want to tell my friend how to do it all in one easy step from the CLI. He has no idea what I'm talking about, does not know how to get to the CLI, and did not even know Macs have them until I mentioned it to him.
So could you kindly provide my friend with a no-assumptions, comprehensive, clear list of beginner's instructions that will tell him exactly what to do to? He needs to: 1. Get into the CLI 2. Locate the tarball he downloaded from Gmail 3. Unzip it and open it 4. Get out of the CLI and back into the GUI.
I would deal with the tarball this way: $ tar xjvf ./texts.tar.bz2. Could he use that command? I don't have any idea how to leave the graphic world on a Mac. My view is that fulfilling his request will be difficult and a lot of work for him as well if I don't use a tarball, and he needs to learn something about the OS he's using. I'll be interested to see how Mac users do it, as well. Yes, I expect the job can be done in the GUI on a Mac, but as I say, I would like to expand his universe (and mine) just a bit. Dragging him out of the GUI won't hurt him, and the learning experience could give him a bit more respect for the power and flexibility of the OS he uses daily.
Is there a way to gather all the information that we can find in the Activity Monitor (cpu, memory, open file-descriptors for each process) via the Terminal? In fact, I am looking for a procfs (/proc) equivalent.
I installed the FLAC Tools for Mac OSX a while back onto my machine, which added a program to the command line of "Terminal.app", and allowed me to convert media from and to the FLAC format using the command line, by simply running the command:
flac
in the Terminal.However, now I no longer need the ecoder installed on my computer; the question is, if it's a command line based program
Info:iMac Intel Core i3, Mac OS X (10.6.8), ATI Radeon HD 4670, 4GB DDR3 Memory
When I tried to type the letter 'o' in Terminal, the application just wouldn't let me and keeps flashing every time I press the 'o' key. I searched the internet but can't find the solution for this issue. Disabling me from typing this certain alphabet has caused me a lot of inconvenience..
I've just installed the BRL-CAD application and it need a command line input (/usr/brlcad/bin) to the System - see below. I am not that familiar with the commands although no problem getting into the Terminal. I just don't want to screw this up. I am running a Mac Mini, 2.66 Ghz Intel Core 2 Duo, 4 GB RAM, OS 10.6.5. I need some step-by-step info in getting this embedded and the application up and running.
Setting Up the Path: Once installed, you will need to add /usr/brlcad/bin to your system PATH. For Bourne shell users, you can run the following: PATH=/usr/brlcad/bin:$PATH ; export PATH For C shell users, this should do the same thing: set path=( /usr/brlcad/bin $path ) ; rehash
This has got to be an easy one for the command line experts. Could someone please tell me how to run the chown utility, so as to change permissions of a folder to read & write for the "currently logged in user"? I guess I am looking for a variable for the username, since I will be running this command as part of a shell script. I do not wish to specify a username, which would make it possible for me to run the script on any computer for any logged in user.
I'm looking for a command line utility (Audacity isn't scriptable as far as I know) to record from line-in or microphone to just raw audio (like .wav file). Does anyone know of any free tool that would do this?
I have a Power MAC G5 that "has" Tiger 10.4.2 on it. The problem is that it wont boot past "login window starting". So I decided to buy Leopard. Problem is that it keeps kicking the DVD out during the "c" boot. Now I am told the system might need a firmware update for the DVD player. "Apple Superdrive Firmware Update 2.1". Heres my problem: I cant boot into Tiger. I get stuck at the login screen. So I want to know if there is a way to do a firmware update in "Single user mode".
I'm dumb and late last night decided to follow the directions in this article:(URL) Using Lingon, I modified the startup parameters of "syslog" from "/usr/sbin/syslogd" to "/usr/sbin/syslogd -c 3 a". Of course by fiddling around with things I shouldnt have, my computer wont boot past the gray apple screen or past "waiting for dsmos" in verbose mode. I would backup from Time Machine, but my most recent backup doesnt have several important large work files that wouldnt fit in my Dropbox. I realize it was stupid to mess around with this without backing up, but feel free to flog away! I've run diskutil, verified/repaired, run fsck -fy from single user mode, reset pram, wont boot to safe mode, etc.
My question: is it possible to edit the startup parameters of "syslog" from the command line in single user mode? If so, how? AND Is it possible to reinstall OS X system files from the boot disc without erasing my entire disk?
mysqld has a ton of really nice startup options to help me debug my app. However I cannot figure out how to shutdown and restart MySQL from the command line and pass these options to mysqld.Snow Leopard and MySQL 5.1.56 MySQL Community Server. Â
Is there a command line tool I can use to record audio on my intel imac? In Linux, I use the arecord tool and was wondering if there is something similar for the Mac. I do not want to use a GUI tool like Audio Hijack Pro because I already have and use that app. I now prefer to use a command line tool instead.