UNIX is both the underlying code and architecture that makes up Mac OS X / iOS as well as a way of interacting with a Mac using the terminal app, X11 app, and various shells like `bash` or `zsh`. Whether you're logging into a mac using `ssh`, using `mdfind` or `tmutil` or using other open source ...

learn more… | top users | synonyms

17
votes
4answers
9k views

Is there a way to convert audio files in Mac OS X or the command line without using iTunes?

Now, I know I can use iTunes to convert music. But it's quite a pain.. All I'm asking is: Is there anything built into OS X or UNIX for converting files? Right now I simply want to convert .mp4 to ...
11
votes
1answer
269 views

How does iOS delete a file technically and can it potentially be undeleted?

We have an interesting discussion here about file deletion on iOS devices. The question was: if I delete a file using NSFileManager, what's happening under the hood? My understanding is that deletion ...
9
votes
9answers
650 views

Which command-line packages do you need? [closed]

I generally have one of Fink, MacPorts, Homebrew installed. Most often for a single, small, and trivial package. I've found that all my day-to-day software exists in OS X versions. So, which non-OS X ...
9
votes
1answer
3k views

What is the difference between the sudo and su command?

What is the difference between the sudo and su command? Why does OS X handle these different than Linux?
8
votes
2answers
192 views

Piping multiple commands

I would like to run the following command and pipe stout of both to TextEdit: pmset -g; echo; pmset -g assertions | open -f -a TextEdit This doesn't work, it only executes the latter: How?
8
votes
4answers
3k views

Remotely SSH to IP address in home network

I've got a device at home I want to SSH to from work. The device has port 22 open locally and I have port 22 opened on my AirPort Extreme. However, on the AirPort Extreme it says the open 22 port only ...
8
votes
3answers
3k views

How do I change the time format used by ls command line on osx?

I want to make ls display time in ISO format (military format). How can I change this behavior? On Linux I knew that I could force ls to display time in long format by usin --full-time but this ...
8
votes
2answers
6k views

Proper group ID (gid) for Lion?

If you create a brand new admin account in Lion, the following will be your id and group memberships (from $ id [new Lion account] | perl -lne 's/ /\n/g; s/,/\n\t/g; print;'): uid=504(lt) ...
7
votes
5answers
51k views

Copying ISO file to USB drive in OS X?

I have tried to copy an ISO file to a USB drive. I am unable to do it with Disk Utility. How can I copy the ISO file to a USB drive? But I get the below. I have enough space in the 16GB USB drive ...
7
votes
1answer
221 views

Why are Mac files able to have multiple owners?

Regarding Unix file permissions, which Macs use, why are Mac files in particular able to have multiple owners? For instance, you can view the "Get info" panel of a file, and under the Permissions ...
6
votes
7answers
11k views

How to monitor file access for an OS X application?

I am looking for the OS X corespondent of FileMon, that was later included in ProcessMon. BTW, it is essential to be able to filter by process.
6
votes
6answers
346 views

How to prevent the application launched in Terminal from undesirably exiting?

I launch applications from the Terminal with commands like this one : /Applications/Mail.app/Contents/MacOS/Mail & The important part is the &. For Unix / Linux / Solaris : I have ...
6
votes
1answer
967 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?
6
votes
1answer
174 views

/usr/sbin/uninstall? What is it/what does it do?

There's a /usr/sbin/uninstall command on my system. What does it do? There is no man page, and running it says "You must be root to run this tool.", and (after sudo uninstall -h) it says "URL is ...
5
votes
2answers
474 views

Is there a UNIX-style triple click to select path in Terminal.app?

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste. This doesn't ...
5
votes
3answers
3k views

How can I manipulate several security settings from terminal?

I want to change these behaviors from terminal: Auto-login Showing password after screensaver and sleep mode Go to sleep mode after x minutes Enable screensaver after x minutes
5
votes
2answers
142 views

Where are all of the command line tools installed?

I was playing around to set up a prober working/development environment. I installed command line tools such as: NodeJS NPM Grunt Bower Where can I find those tools and how can I delete them? Is ...
5
votes
1answer
901 views

File can't be moved by root on OS X

I tried to move a few files to a subfolder on OS X. One refused to move. It said Operation not permitted. I tried again as root: $ sudo mv file subfolder/ mv: rename file to subfolder/file: Operation ...
5
votes
1answer
501 views

“opensnoop” utility doesn't work with spaces between filenames, how to fix?

I use "opensnoop" /usr/bin/opensnoop to show all files which are opened from different processes. But when I want to specific a file with sudo opensnoop -n "directory/filename" i'm getting ...
4
votes
2answers
2k views

How to strip a filename of special characters?

I have a file with a name such as "Today's Date.txt" What I am interested in is stripping away all special characters using the terminal such as: " - , ' ' [ The reason for this is because I ...
4
votes
2answers
4k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
4
votes
2answers
5k views

Installing Homebrew on Lion

I am trying to install Homebrew on Lion but keep getting an error. $ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" I run the above code, which results in: ==> This script ...
4
votes
1answer
3k views

Sudo keeps asking for password, despite that NOPASSWD already set

The following sudoers configuration used to work well in MacOS 10.8.5, several days ago I upgraded to Mavericks, NOPASSWD flag does not seem to work anymore: # User privilege specification root ...
4
votes
1answer
2k views

How can the 'mail' command be used?

I've had my first Mac for about five months now. Though, even when I was a full-on Windows user, I never did things through a command line; I was pretty much for the GUI all-the-way.. But now that I ...
3
votes
2answers
665 views

SSH Key Error, sudo works fine

When I try to ssh (using ssh user@server.com) into my server at home from either the local network or from outside, I get the following error: But if I use sudo ssh user@server.com, it works with no ...
3
votes
4answers
8k views

How do I search all hidden files that are in hidden folders using Terminal?

I need to find some configs buried in some hidden folders and can't recall where they are to navigate to them directly Cmd+Shift+G. I did a sudo find -name Foo* (slow), but none of the returned files ...
3
votes
3answers
17k views

How do I delete a BootCamp partition using Terminal's diskutil?

For some reason, the BootCamp Assistant app won't let me delete my BootCamp partition. How can I do so using Terminal and the diskutil terminal app?
3
votes
2answers
227 views

Mac OS X UNIX-oriented Tutorial

Is there any Mac OS X tutorial/book that covers the UNIX part of this operating system? Topics like: Managing daemons from the command-line Package management Install/Remove dmg's from the ...
3
votes
1answer
270 views

Where is the New Oxford American Dictionary stored?

I'm trying to build a command line tool to look up definitions of words, it's only a dummy app for me to practise my C++ skills. I know there is a list of words stored at /usr/share/dict - but what ...
3
votes
1answer
385 views

What is OS X's equivalent of Linux's NSS?

Anyone familiar with the internals of Linux knows about NSS; it's the subsystem that services, like gethostname() and such, delegate to. The code that actually makes DNS queries or reads /etc/passwd, ...
3
votes
1answer
247 views

how to get ls to list files in case-insensitive order?

How do I get the ls shell command to list my files in: case-insensitive order with the directories at the top? The reason I ask is: I want Aquamacs Emacs dired to list my files and directories ...
3
votes
4answers
564 views

Setting time format preference in unix (Mac-Terminal)

I'm learning to work in unix using Terminal on a Mac and I'd like to set the default listing for the timestamp to display in 12 hour time, using AM and PM, instead of 24 hour time (ie: 1:00 PM, not ...
3
votes
1answer
651 views

Is there any port of start-stop-daemon for OS X?

I am trying to use some init.d script under OS X and I while some are just working properly, I discovered quite a few that to rely on /sbin/start-stop-daemon and I am looking for a port of it for OS ...
3
votes
1answer
219 views

Is there a maximum length of metadata that can be written in one xattr command?

Is there any text length limitations for how long text can be put to xattr? I plan to put my AppleScripts source code to script files so Spotlight can find it. Using Finder Comments isn't an option ...
3
votes
1answer
3k views

Unknown terminal 'xterm-256color'

Keep getting a message in Terminal saying tput: unknown terminal "xterm-256color" This message typically appears when running homebrew, and while I can swear it's popped up on other places, I ...
3
votes
4answers
2k views

Using locate.updatedb doesn't work in Lion

A week ago I upgraded to Lion from Snow Leopard. I want to use the locate command, but the locate database has not been built yet. So I tried running sudo launchctl -w ...
3
votes
2answers
943 views

How to install TermKit on Mac? [closed]

https://github.com/unconed/TermKit command: git clone https://github.com/unconed/TermKit.git --recursive Prompt: fatal: https://github.com/LearnBoost/Socket.IO.git/info/refs not found: did you ...
3
votes
1answer
101 views

Can't write to ~/Library, even though permissions look OK

I'm totally stumped on this one — a Macbook Air, 10.9.2. As far as I can tell, I should be able to write to my Library directory. Everything I can see suggests I should be able to: [njvack@zot ...
3
votes
1answer
244 views

Opening an OS X disk image with a launchd agent while the display is sleeping

I created a launchd agent which opens a non-password-protected sparse disk image (and mounts its solitary volume) daily at 2:45AM in preparation for backup software to write to the volume. The launchd ...
2
votes
1answer
930 views

What is standard for os x filesystem? e.g. /opt/ vs. /usr/

What does and should go into /opt/ and what should/does go into /usr/? My understanding is that /usr/ used to be for user home directories, but since that exists in /Users/ - what is the purpose now? ...
2
votes
3answers
985 views

Can you use the command line on a Mac to get to a networked Mac?

I have a networked mac desktop and a wireless laptop. I would like to use the desktop mac to test web pages from the laptop. The mac desktop has a php/mysql/apache server outside the router for ...
2
votes
1answer
199 views

Where should shell tools be installed?

Are there Apple guidelines for where user shell tools in Mountain Lion should be installed? Some (e.g. TeX, or Apple's Git) end up in /usr, and others (e.g. X11) seem to end up in /opt (sometimes with ...
2
votes
1answer
350 views

Compiling LaTeX in Apple products: is something like pdflatex around?

My Apple friends says that they cannot compile LaTeX. I don't have a Mac at hand to test what the problem is. How can I get something like pdflatex to get LaTeX compiled on a Mac such as a MacBook ...
2
votes
4answers
4k views

How to find all files that are larger than 1GB on the Mac HD?

It seems that either one of these commands can be used: sudo find / -size +1G sudo find / -type f -size +1G But when it gets to /Volumes, it actually look at all the back up files by Time Machine ...
2
votes
2answers
218 views

Where do these Terminal commands come from?

I don't know any specific term for these Terminal commands, so i want to give an example: defaults write com.apple.dock itunes-notifications -bool TRUE With this command, you can enable an ...
2
votes
1answer
134 views

Super and admin user in OS X

Superuser account is disabled by default in OS X (Mavericks). But if you run sudo -l you will come to know that the admin user can execute all superuser commands. Then what is the point of disabling ...
2
votes
2answers
192 views

Parsing dates in Mavericks

I'm sure this used to be valid: $ date -d"2013-10-12T09:23:28+0100" +%h usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | ...
2
votes
1answer
311 views

How does Apple achieve such an ultra fast boot up?

I'm a recent Mac user (MBP) and the booting time really surprises me. Within few seconds, from complete power down, the OS prompts you to log in, then the rest just flies! And even faster recovery ...
2
votes
2answers
2k views

where is the system wide $PATH set in OSX?

I'd like to set the $PATH variable for all users but don't find where it is defined. Having no $PATH export in my .bash_profile I have this ...
2
votes
2answers
3k views

Installing gnuplot (or similar) on Lion

All the packages needed to install gnuplot through MacPorts on Lion succeed, except for aquaterm. Installing gnuplot through Fink is far less lucky on Lion. Fink bails out after only a third of the ...