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.

learn more… | top users | synonyms (1)

2
votes
1answer
111 views

UTF8 filenames and shell utilities

Try the next commands from the terminal: touch á.txt $ ls á.txt find . -name á.txt -print prints nothing. My Terminal.app settings are utf8 - see here: The question: How to achieve to work ...
1
vote
2answers
309 views

How to properly register a file extension on mac so it will also work by running open from the command line?

I have the following problem, I registered a file extension to be opened by a Mac Application by clicking on the file in Finder and selecting to always use the target application to open the files. ...
0
votes
1answer
1k views

Server certificates are not properly validated by subversion/openssl

I noticed that the svn cli fails to validate https certificates and always ask for manual validation using the certificate fingerprint: mbp:~ user$ svn co https://svn.mysite.com/svn/testrepo Error ...
8
votes
6answers
638 views

Where can I find a comprehensive and detailed technical software manual for OS X?

Are there books written for OS X (particularly the most current version) like the hundreds of thousands written for Unix? I'd like to know about the command-line utilities and the locations of system ...
0
votes
1answer
53 views

Run a program without networking?

Is there a way to run a program on OS X (e.g., from the command line) but without letting it see the network? I can turn off and disconnect all networking, but then all my other processes will be ...
1
vote
1answer
61 views

prevent doubleapple files creation when tarring directories (Snow Leopard)

I'm looking how to prevent tar from saving or creating .AppleDouble shadow files and preferably do it in an automated manner. There are a few questions asking why this happens, but I want a solution ...
9
votes
5answers
38k views

How can I list all user accounts in the terminal?

How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8. I have seen this suggested - dscacheutil -q group ...
10
votes
2answers
811 views

why does OSX add extra '._<filename>' when I tar a directory?

I'd just like to know why if I "tar -czf" a file/directory, osx adds a: ._ for each file? I see these when I untar in linux. Or when I work with the uncompressed project in eclipse as it doesn't ...
0
votes
2answers
28 views

Determining currently used NIC on CLI

I do a lot of work on Virtual Machines, and have several scripts to help me configure them quickly. I could fully automate spinning up a headless VM, except that I need to know the IP of my host ...
15
votes
3answers
3k views

Can Mac App Store installs & upgrades be automated?

How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice. Relevant puzzle pieces: installer: note ...
6
votes
2answers
8k views

how to reinstall xcode command-line tools?

I had serious problems from two versions of Xcode on the same machine. I removed all Xcode app instances & many other non-System 'xcode'-related files, then reinstalled the app (4.6.2), fixing my ...
3
votes
2answers
351 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 ...
4
votes
1answer
215 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 ...
33
votes
8answers
58k views

Why doesn't .bashrc run automatically?

I put some alias commands in my .bashrc file, so that they might be loaded everytime I open a new Terminal window. Yet this doesn't happen. I have to select run script: in the ...
3
votes
1answer
165 views

List of GNU packages for homebrew

My team is working with Mountain Lion MacBook Pros, and we're using the GNU CLI tools, like wget and watch, intensively. Whenever a new team member joins us, we tell the new hire to install homebrew ...
1
vote
3answers
2k views

How do I change GNU Screen's meta-key to Cmd-a?

GNU Screen's default meta-key is Ctrl-a, which is really inconvenient for me because I frequently use Ctrl-a and Ctrl-e to move the cursor to the beginning or end of the line. I'd prefer to change ...
0
votes
2answers
524 views

Temporarily disable Notification Center in Mountain Lion from command line?

I've been trying to create a script to disable/enable the Notification Center, even if it's temporary. It should do the same as manually sliding the Notification Center, scrolling up, and toggling the ...
4
votes
1answer
311 views

How do I prevent the permissions denied message from being displayed when I do a find command?

I'm trying to run a find command, aka: find / -name "some_file" -print and my results are full of permission denied messages: find: /.DocumentRevisions-V100: Permission denied How do I prevent ...
0
votes
2answers
946 views

PageUp and PageDown keys for Irssi (IRC) in Macbook?

I cannot find the keys on my mackbook. I need them to go page-up and page-down in irssi (IRC). I have tested the tips here but they do not work. They model some different Up/Down, not the traditional ...
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.
4
votes
2answers
3k views

How to change the creation (st_birthtime) date/time of a file in Lion?

touch(1) can only change modification and access times, but has no options for creation time. This does not work, at least not on Lion. So how do I change the creation time, also referred to as ...
1
vote
2answers
131 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
2answers
275 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 ...
2
votes
2answers
448 views

Is it possible to get the full suite of unix options for the command line tools on OS X?

I follow Unix Tool Tip on Twitter and it is interesting that many of the tips that are posted are not available on OS X. For example: cp - u will only copy files that don't exist, or are newer ...
9
votes
8answers
7k views

How to retrieve current wattage info on OS X?

Is there a way to retrieve the current watt usage info on OS X Snow Leopard? I'm using mid-2010 iMac, so I'm not looking for just battery-related apps. Does OS X even monitor power usage? Do I need ...
2
votes
3answers
1k views

How to manually trigger background image change?

I have set the wallpaper to change every hour and have enabled it to cycle them in a random order. Sometimes the background image changes to an image that was set just few rounds ago and I'd like to ...
7
votes
3answers
2k views

Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?

I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
6
votes
1answer
741 views

Adding a song file to iTunes via the command line without playing the file

I want to add song files to iTunes via the command line. open -a iTunes -g song.mp3 does exactly this. - However it starts playing the song, too. Any way to avoid this?
2
votes
1answer
247 views

Play .ogg on command line

How can I play a .ogg music file on the command line? On Linux I can use ogg123, but what about on Mac?
1
vote
1answer
387 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 ...
0
votes
1answer
114 views

Using dictation in the command line (e.g. transcribe an audio recording to a text file)

I have some audio recordings and would like to transcribe them into text files. I was wondering whether there is a command line tool that could use the built-in Dictation to do that? And if so, is ...
0
votes
1answer
687 views

How to enable Maven autocomplete on Mac OS X command-line?

When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this: mvn pa [TAB] -> mvn package mvn je [TAB][TAB] -> mvn jetty:run
1
vote
2answers
384 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
434 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. ...
2
votes
1answer
2k views

How to remove xattr com.apple.quarantine from all .webarchive files with that extended attribute?

Spread across multiple file system I have numerous .webarchive files that were saved by OmniWeb. So for example: sh-3.2$ ls -@ 2012-03-19.webarchive 2012-03-19.webarchive sh-3.2$ ls -@l ...
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 ...
1
vote
1answer
298 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 ...
0
votes
1answer
362 views

Why would SetFile be unavailable after upgrading to Mountain Lion?

I have Xcode installed, and have used the SetFile command (installed with Xcode) for some time. I just upgraded to Mountain Lion, though, and find that it is suddenly unavailable. I verified that ...
3
votes
1answer
253 views

Using the apple wireless keyboard with an iPad with PC/Mac-like keyboard commands

I have jailbroken iPad2 (iOS5.1.1) and an apple wireless bluetooth keyboard that I use for typing on the iPad. Although the keyboard is a joy to use, I can't use it for much else other than typing ...
2
votes
4answers
2k views

How to run Wireshark in the background without the GUI?

I am trying to run Wireshark on Mac OS X in the background. I installed the command line utilities, and so I am able to start Wireshark and capture packets using the command line. The only thing I ...
3
votes
3answers
798 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 ...
0
votes
1answer
2k views

How do I install handbrake cli?

I've downloaded the Handbrake CLI. What's the best place to install a command line app on my Mac?
0
votes
1answer
764 views

How can I get tab completion back?

In terminal, if I try tab completion in a directory e.g. Movies, instead of the movies beginning with S (if I type S followed by tab, I see SetFile, Splitforks and SystemStarter. I suspect I installed ...
2
votes
0answers
94 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
3k 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 ...
2
votes
1answer
203 views

Paste <TAB> into Mac OS X command line

I want to paste <TAB> into command line, in order to execute cut command with <TAB> as the delimiter. Everytime I try to do it, it simulates clicking the tab key and completes the command ...
8
votes
3answers
1k views

Copying files to the clipboard using applescript

Often I find myself at the command line wanting to copy files to the clipboard, so that I can paste them as attachments in Mail. If I have an image file, image1.png, I can accomplish this with ...
2
votes
1answer
170 views

Why do debuggers need an admin password?

Why does running LLDB or instruments require elevated privilages?
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 ...
1
vote
2answers
345 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 ...