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 ...
9
votes
1answer
1k 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?
9
votes
4answers
3k 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 ...
8
votes
4answers
2k 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 ...
7
votes
9answers
591 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 ...
7
votes
2answers
4k 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)
...
6
votes
1answer
157 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?
5
votes
3answers
1k 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
4
votes
2answers
288 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 ...
4
votes
2answers
4k 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
2answers
1k 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 ...
4
votes
1answer
1k 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
387 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
2answers
44 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 ...
3
votes
2answers
490 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 ...
3
votes
3answers
6k 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
1answer
290 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
78 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
2k 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
3answers
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
4answers
7k 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 ...
3
votes
2answers
808 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
0answers
97 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
6answers
4k 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.
2
votes
3answers
468 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
4answers
1k 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
205 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
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 ...
2
votes
1answer
123 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 ...
2
votes
1answer
100 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 ...
2
votes
1answer
82 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 ...
2
votes
1answer
31 views
How can I (re)create development and build tools on a corrupt installation?
On my previous computer I had Xcode working nicely; on my present computer, with Homebrew installed, gcc and make are present in /Developer/usr/bin but not /usr/bin. On the whole when I try to ...
2
votes
1answer
242 views
why isn't my environment variable visible from the command line?
I'm trying to run the james smtp server on Lion. When I do this ...
sudo JAVA_HOME=/Library/Java/Home ./james-2.3.2/bin/run.sh
... it works fine.
However, I'd like to make JAVA_HOME an ...
2
votes
2answers
717 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
1answer
35 views
What is the effect of permissions on external drives?
I've set the permissions on files on my removable external drives in ways that seem to make sense to preserve some degree of security. For example, for files that only I should have access to, I've ...
2
votes
4answers
310 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 ...
2
votes
1answer
220 views
bash file recovery?
I think I messed up my bash file /bin/bash when trying to create my first script, it displays a message saying "process completed" and locks my terminal, if I switch to another shell e.g sh, then it's ...
2
votes
2answers
862 views
User changed to 502 on OSX
I have a small problem with my permissions. I use rsync frequently on a certain target directory, but one day I by accident I used "sudo rsync", and now all my permissions for the files in the ...
2
votes
3answers
198 views
What tools exist to recover a file I clobbered using cpp in terminal?
I accidentally typed cpp Scriptname.py DestinationDirectory, intending to copy the Python script into the folder.
I realized afterward that I should have used cp, but now my Python script is ...
1
vote
3answers
3k 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 ...
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
211 views
How can I get Unix (brew/xcode/vim) acting like Unix under Lion?
I "upgraded" from Snow Leopard with Homebrew and vim both chugging along happily, to Lion. Now vim hangs/segfaults, and when I invoke brew, it complains xcode is missing, and continues to do so after ...
1
vote
1answer
265 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 ...
1
vote
2answers
74 views
I maintain my Unix website on, presently, a Mac. Can I maintain it from a (not jailbroken) iPad 3?
I have a website at JonathansCorner.com, which for the most part is a static collection of files, mostly HTML5, served up by a Linux Apache server. Maintaining it is mostly a matter of creating new ...
1
vote
1answer
152 views
How to use a UNIX console app
I downloaded a port knocking script from
http://www.zeroflux.org/projects/knock
It downloaded a file knock, which is a Unix Executable File. When I double click on it, it runs the Terminal, where it ...
1
vote
1answer
143 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 ...
1
vote
2answers
233 views
Sshfs or its substitute in Apple products?
I instructs my Apple friend to get Sshfs, i.e. to mount an outside target, to home -directory but he cannot find sshfs for Mac. Dose there exist some substitute or some Apple-compiled version for ...
1
vote
1answer
725 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
187 views
What more does installing Homebrew allow me to do? [closed]
Homebrew is a useful tool to install UNIX tools.
What are useful things to do with homebrew? What tools can you recommend?
1
vote
2answers
92 views
Reason why applications aren't stored in the Home-Folder?
I wonder why Apple don't put all applications in an applications folder inside the Home-Folder. So they could offer a hole new mac for each user.
Every file is user specific, except for the ...
1
vote
1answer
116 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 ...
