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

1
vote
3answers
103 views

Writing to plist file multiple preferences same time

I need to write about 50 preferences to a .plist file. Is there any way to write just once to plist file? My current code has 50 defaults write lines. do shell script "defaults write testing.testing ...
0
votes
1answer
139 views

How to specify group id for a user-defined group

When I set up my accounts in Snow Leopard Server, I was able to give an explicit group id to my user-defined groups using the old Workgroup Manager. Now that I've updated to Mountain Lion Server, I ...
0
votes
1answer
38 views

publickey error using cvs

I'm trying to get a copy of the repository for scrotwm using their cvs repository, but I'm having some trouble. I'm running the pull according to this example: ...
0
votes
1answer
454 views

Downloading multiple files with curl with different proxies

I'm trying to download multiple urls from different domains using different proxies. It should do all these in one row of code, running curl just once: do shell script "curl --proxy 1.2.3.4:800 ...
0
votes
2answers
99 views

How to find files not containing comment x?

I try to find all "*.xyz" files in folder x which does not have comment "abc". This code does the opposite. I would prefer to use Spotlight if possible. How i can do this? Thanks do shell script ...
1
vote
0answers
118 views

Touching files in correct order

This code touches files in alphabetical order. I need to touch files in order it is in list_of_files, so first it touches file2, then file3, then file1). Is there any other way to do this than to ...
-1
votes
1answer
42 views

Creating preview and icon for screenshots [closed]

I would like to make this code to automatically create preview and icon so it looks nice in Finder and so i don't have to wait my graphics app to create these things when i first time open in browse ...
6
votes
1answer
958 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?
1
vote
2answers
166 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
415 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 ...
3
votes
1answer
217 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 ...
5
votes
1answer
499 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
78 views

How to get inode from alias file?

In this MacWorld forum thread aliases are described as Aliases can reference an object in the file system either by a persistent ID or by path. Generally they will contain both pieces of ...
1
vote
0answers
281 views

Is there a best / OSX-specific way to force all files created in a directory to have certain group ownership?

Basically I need any file filefoo that is newly created by userfoo or userbar, both members of groupfoo, in /Users/Shared/SpecialDirectory to have the same ownership that would be achieved by that ...
0
votes
1answer
24 views

How i can log various information of files in directory?

I'm looking for a way to get the following information via AppleScript: all the information ls provides including the creation date/time of a file or folder MD5 hash, Finder labels and ...
0
votes
2answers
266 views

Thread count of process x?

My AppleScript needs to get thread count of process x. I have tried many ps etc codes but all these are not working for some reason. I tried these: do shell script "ps uH p 301 | wc -l" -->" ...
0
votes
2answers
86 views

What is the maximum amount of file arguments I can pass to a command?

If I do this in OS X, what is the maximum amount of files I can test? Or is there a maximum length for this string? do shell script "md5 -q 'path/to/file1.txt' 'path/to/file2.txt'"
-1
votes
1answer
65 views

Deeper knowledge of os x? [closed]

I want to gain deeper knowledge of os x, which books/courses/forums should i take? All books that i have seen was about how to save your document in Pages. First of all, i will learn bash but what's ...
3
votes
1answer
245 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
1answer
268 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 ...
1
vote
1answer
3k views

How do I change the “primary group” for an existing user?

My current primary group (the gid I see listed by id) is me, rather than staff. I'd like to change it to staff, without changing anything else about my user account. How do I change the "primary ...
2
votes
1answer
49 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
1answer
195 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 ...
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 ...
3
votes
1answer
243 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 ...
1
vote
2answers
95 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 ...
7
votes
5answers
50k 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 ...
2
votes
1answer
48 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
488 views

Running *ix Commandline tools in Macbook Air? VNC? Virtual-machine? Usable or too slow? [closed]

I haven't used OS X since an awful experience with its commandline tools and CD Xcode about 2009, that time getting rid of all Apple stuff but coming back after iPhone/iPad/FaceTime/iCloud/etc. Now I ...
1
vote
1answer
277 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
4answers
10k views

Xcode for iPad?

I don't have an Apple computer, only iPad and Debian computer but I still would like to add a feature to iOS app here. Earlier I found out that I can download Xcode, more here, from Apple Store. Now I ...
1
vote
2answers
107 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
1answer
616 views

How to fetch an AirPort/Wi-Fi password using /usr/bin/security

I have been trying to use /usr/bin/security rather than hard coding login/password information into scripts. For example, here's how you get the password for 'pinboard.in' security 2>&1 ...
2
votes
1answer
349 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
3answers
383 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 ...
2
votes
1answer
309 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 ...
0
votes
0answers
2k views

How can I ask Mountain Lion to have apache2 recognize .cgi and execute it as a CGI script?

I've upgraded from Lion to Mountain Lion, and have noticed as a result of the upgrade, besides my screen saver saying it won't work on this version of OSX, Apache is displaying the private web ...
0
votes
1answer
150 views

Getting .profile to execute after .bash_login

When I installed RVM, it turns out that it created .bash_login with this: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session as a function ...
0
votes
1answer
40 views

My home folder opens up Photo Booth when clicked on

For some reason when the icon for the home folder is clicked it opens up photo booth. I changed what application it uses and the finder stays open. I tried fixing permissions and checking the hard ...
1
vote
1answer
478 views

Why can't I chmod to make a file executable without sudo?

On OS X 10.6.8, I made a small script file in my home directory and tried to make it executable. Surprisingly, I found that chmod had no effect until I ran it as super-user. I own and have write ...
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?
0
votes
1answer
1k views

How can I have Qt Creator to recognize my environment variables?

I use Qt Creator as my main IDE for cross-platform C++ application development. In doing so I had set it up so that it depends on a set of environment variables that I define in .bashrc. On Linux ...
1
vote
1answer
1k 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 ...
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 ...
1
vote
1answer
30 views

What is the recommend location for storing compiled binaries for NON-admins?

I know that administrators should be installing such binaries in /usr/local/bin, but what if a user doesn't have admin access? And/or what if a user wanted said binaries to travel with their home ...
2
votes
1answer
399 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 ...
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?
2
votes
3answers
238 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
2answers
1k views

Problem trying to install iftop via Homebrew

I got Homebrew installed, but: >brew install iftop ==> Downloading http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz File already downloaded in /Volumes/0/z/Library/Caches/Homebrew ...
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 ...