Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.
2
votes
1answer
90 views
Controlling iOS apps via command line
I have jailbroken iPad (iOS5.1.1) with the shell utility installed.
I'd like to be able to launch and control applications via the command line, as I would normally do in Unix or Linux. Say I want to ...
2
votes
0answers
59 views
“df” command making network requests?
I was watching Little Snitch for another process, and noticed df was making requests to various servers. I thought df was only for checking free disk space locally, but it appears to be doing more ...
2
votes
0answers
69 views
How do I monitor the total physical and virtual memory usage of a process and all of its descendants?
From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?
This is useful when you want to monitor the ...
2
votes
1answer
198 views
How do I emulate Internet Sharing from the command line?
I'm trying to set up my Macbook Air to share an OpenVPN connection for use while I'm on the road and don't want my iOS traffic to go over the open Internet. Sadly, Mountain Lion's Internet Sharing ...
2
votes
0answers
362 views
How can I use RSVG with ImageMagick?
I'd like to use the RSVG for SVG processing in ImageMagick (the included library is fairly incomplete). RSVG is a supported delegate but needs to be installed separately.
I've installed librsvg and ...
1
vote
3answers
570 views
Can grep highlight matching text without hiding file content?
I frequently use grep's context command line options (-A, -B, and -C), but occasionally I want to view the whole file with matching expressions highlighted. To accomplish this currently I simply ...
1
vote
3answers
129 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 ...
1
vote
5answers
2k views
How do I execute command line scripts?
In Windows, I can create .bat files. I double click it and all lines are interpreted as if I had entered it into the console.
In OS X, what file or program do I have to use? If I want write a file ...
1
vote
2answers
87 views
How can I do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion?
I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else.
I am presently filtering ...
1
vote
2answers
183 views
Terminal in full screen mode: how do I recover from “cat /dev/random”
What are the ways I can regain control over my computer when I have terminal in full screen mode and type:
cat /dev/random
1
vote
3answers
85 views
At the command line, how can I 'arrow along' faster using words instead of chr's
I am at the command line and I have
. /this/set/of/directory/this_command "parm1", "parm2", "parm3"
When I 'up-arrow' to recall previous lines, how can I move along the line from "word to word". ...
1
vote
1answer
111 views
Adding Mac-specific directory to PATH when home is shared
My /home/myusername/ directory is provided through a network, and looks exactly the same on my Linux machine and my Mac Mini. I'd like to add to PATH a directory of Mac-specific software in my home, ...
1
vote
2answers
117 views
Converting Audio to AC-3 using afconvert?
I'm trying to use afconvert to convert an audio file to AC-3 format. It's 5.1 audio, having already been converted from DTS to WAV (using ffmpeg, since afconvert doesn't seem to deal with DTS).
As ...
1
vote
3answers
229 views
Files synced by Synk Pro have wrong owner on both synchronized Macs – how can I fix it?
I sync some folders within my Home folder between two Macs (running Lion and Mountain Lion) using Synk Pro, a commercial live file sync application. I have the same account name on both computers.
...
1
vote
2answers
265 views
Why do I keep getting this error message after updating to OS X 10.8.1?
After I updated to OS X 10.8.1, I keep getting this error message when I execute purge:
[ERROR] The device-file for this operating system, 'osx-12.1.0.xml', was not found. An attempt to revert ...
1
vote
1answer
399 views
using gcc, g++ outside of xcode on mac
I'd like to spend some time aside from the IDE for a bit and use command line gcc, g++ compilers.
When i use my terminal, they however, can't be found.
How can i install them?
I honestly am ...
1
vote
3answers
244 views
How to force a diff format for TextMate?
I have this alias:
alias hgd='hg diff|mate'
The problem is that for some reason the temporary file thus created will be a .txt, while I'd need it to have the diff syntax highlight.
If I manually ...
1
vote
3answers
270 views
Moving a folder with “sudo mv”, how to preserve ACLs?
I'm moving a whole folder from one volume to another (both HFS+), using sudo mv, and thought ACLs would be preserved. However at the end of transfer I see that they haven't been kept, and since mv ...
1
vote
2answers
189 views
Can I extend Alfred with a command-line program to clean up the desktop?
I'd like to have something that I can run from Alfred or the command-line that can run "clean up desktop".
What is a command-line program or apple script that will cleanup the desktop?
Preferably ...
1
vote
2answers
399 views
Is there a free command line program for converting PDF files to SVG?
Once upon a time I used Corel Draw to edit vector graphics. Now I'm looking at using Sketch. I previously converted all my old CDR files to PDF but Sketch doesn't seem to like to open PDFs containing ...
1
vote
2answers
235 views
Exclude files from “central metadata store”
I'm fairly familiar with the mdfind utility. I find it's very useful when I can't find a file or when I need to find a file with certain contents. The problem is that I need to exclude some files from ...
1
vote
2answers
129 views
Why does the Dock executable not yield any useful strings, unlike other OS X apps?
When I run the strings command on the executable file in most OS X apps (•.app/Contents/MacOS/•), I get a list of routine names, possible hidden preferences, etc. When I run the command on the Dock ...
1
vote
1answer
690 views
How do I get a Unix Executable File to run from anywhere, like Java or Git?
I've just created my first Command Line Tool in Xcode.
What do I have to do, or where do I have to put the final output file, so that I can run it from anywhere from within terminal, without having ...
1
vote
1answer
62 views
Installing gcc without admin?
Is there a place to install command line programs on OSX without an admin password? I've tried /bin and /usr/bin, and I have permission for neither. Like a ~/Applications, but for the command line.
1
vote
1answer
130 views
macbook - low power from the command line
I often (for example on the train) want to put my macbook into a state that will maximise the amount of time I have before the battery runs out - so far example I'll switch off the bluetooth, then ...
1
vote
2answers
278 views
How do you list items with and without labels from the terminal?
Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
1
vote
1answer
211 views
Correct syntax for bash grep function?
I'm trying to set up a function to make certain grep command easier.
gr() { grep -r --include=*.\{m,h,xib\} $1 \* ; }
The end result should be a recursive grep of all *.m, *.h, and *.xib files, for ...
1
vote
3answers
1k views
Matlab on the command line error in Lion
I constantly get this warning in Matlab, which I run on the command line:
This process is attempting to exclude an item from Time Machine by path without administrator privileges. This is not ...
1
vote
1answer
295 views
dd to ISO from disc drive makes unmountable / unburnable image?
I'm trying to dd from a disc in my DVD drive on my MacBook to an ISO, but the image always ends up as unmountable and unburnable. The disc is unmounted when I start the process.
I've used dd many ...
1
vote
1answer
51 views
Where do I find the full man page for afplay
In Terminal afplay -h shows full help text but the man page shows hardly nothing.
Is there any way to get a longer help page for man afplay?
I never use Terminal and it would be much easier if i ...
1
vote
1answer
49 views
Backing up individual files with encryption
In addition to local Time Machine backups, I would like to automatically backup my working data from my Macbook to a remote FTP space. Because it's a location I don't control and sensitive data, I ...
1
vote
1answer
3k views
Create new partition in unallocated space with diskutil
I have deleted the first partition on my external HD such that it now has 100GB of free space at the beginning of the partition. I'd like to reclaim that space, but Disk Utility doesn't let me create ...
1
vote
1answer
190 views
Why doesn't the screen command source my .profile?
When I start a new screen, the aliases that I have set in my ~/.profile do not seem to be sourced.
Does anyone know where I can change this or which file is actually read when starting a new screen?
1
vote
1answer
229 views
How do I make a shortcut command in terminal?
I want to have ll as a shortcut for ls -ll. How can I add it to my Termianl application? I use iTerm as my primary Terminal application. I wish there was a single line command solution for it.
1
vote
1answer
660 views
Darwin/Linux/Unix command line email client that supports iCloud?
I need to access my iCloud email from a command line.
Is there a command line client for Mac OS X (and/or Linux and/or Unix) that can connect to Apple's (I assume it is IMAP) servers?
1
vote
1answer
221 views
Switching terminal styles in iTerm 2
Recently I've been trying to become more efficient at the command line, and stumbled upon iTerm 2 a couple days ago. One feature of iTerm 2 is that windows can appear from the top of the screen, so ...
1
vote
3answers
40 views
Change file association in terminal?
Is there a method for associating file types with applications via terminal? I thought ~/Library/Preferences/com.apple.launchservices.plist might do it, and I also have seen: Why is a command line ...
1
vote
1answer
49 views
What does it mean when a process is surrounded by parens in `ps`?
I sometimes try to kill -9 Finder.app when it's misbehaving and I'm in a Terminal. This normally works but every once in awhile it leaves behind the pid, even when run with sudo, and the COMMAND ...
1
vote
3answers
83 views
Can I list files ordered by date added to a folder from a command-line tool like ls?
I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls.
Any other way to ...
1
vote
2answers
77 views
Use Cmd as Ctrl key in vim
How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
1
vote
1answer
55 views
What's the difference between device file and its raw version?
It's convenient to use dd to write image file to USB sticks. But I find sometimes people write dd of=/dev/disk1 and there is alos dd of=/dev/rdisk1.
e.g.
The arch wiki
dd if=image.iso ...
1
vote
2answers
248 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 ...
1
vote
2answers
1k views
Restore disk in single user mode
I wounder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe ...
1
vote
1answer
531 views
Ejecting USB drive via AppleScript does not make drive power down
On startup, I eject my external USB disks with the following AppleScript:
try
do shell script "diskutil eject \"/Volumes/USB Backup\""
end try
This works as expected: the drive powers down. ...
1
vote
1answer
513 views
“readlink” gets the original path of a symlink; what's the equivalent for Mac aliases?
In the terminal, I can use readlink on a symlink and it prints the target path of the symlink. E.g.
ln -s original.txt symlink.txt
readlink symlink.txt # prints original.txt
How do I do this for ...
1
vote
2answers
241 views
Creating a wget OSX Service
I want to create a service to copy the URL and subsequently download it via wget.
How would I go about creating an OSX service to wget arbitrary urls from a browser or system wide. I believe it'd be ...
1
vote
1answer
210 views
How to disable coalescing of log messages in OS X?
I've been using Console to debug some things on my Mac, and I keep seeing --- last message repeated one time --- in the log. Apparently it's not really essential, and you can turn it off on the ...
1
vote
2answers
7 views
Is there a way to set an Application Shortcut in the Keyboard Preference Pane via Terminal?
I'd like to have a bootstrap for my custom keyboard shortcuts to use on multiple machines...
1
vote
0answers
375 views
How do I force a partition and format on a USB key in OS X Mountain Lion Disk Utility or from CLI diskutil?
I have a brand new Memorex TravelDrive 64GB USB disk which is being troublesome.
It's formatted FAT16 on MBR, which is not so nice, and I'd like to put it on HFS+.
I've tried to do this through ...
1
vote
0answers
142 views
Is it possible to download Apple's Command Line Tools for Xcode from the command line?
Background
My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...