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

0
votes
1answer
239 views

What is the purpose of “~/.adobe” directory?

I was cleaning my home directory and found hidden .adobe folder with two files in it: md5 containing only one line "F894CEFB…" userid containing also one line "424E8…" I deleted whole folder and ...
5
votes
1answer
2k 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 ...
2
votes
2answers
140 views

All text boxes : The opposite of ctrl+v (like in emacs)

I like using ctrl + v on mac for jumping with the cursor to the next screen - something like page down but the cursor moves too. Do you know any way to do the opposite - jumping to the previous ...
3
votes
1answer
806 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 ...
11
votes
1answer
297 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 ...
1
vote
1answer
133 views

System event key codes not working on thunderbolt display

My AppleScript works when I am just using my MacBook Pro Retina, however if i have my Thunderbolt Display attached the script does not work. Here is the script which works perfectly on just the ...
1
vote
4answers
3k views

How do you change your UID in OS X Mountain Lion

kimvais @ kimvais ~ $ id uid=501(kimvais) gid=20(staff) ...
7
votes
1answer
266 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 ...
3
votes
1answer
3k views

How to update Python on a Mac with Unix commands

After giving up on doing a disk partition and getting Linux, I decided to try and install Python 3.3.2 on a 32 bit Intel Core 2 Duo iMac with OS X 10.6.8 Snow Leopard. I did pretty much everything the ...
4
votes
2answers
3k 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 ...
1
vote
3answers
124 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
159 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
44 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
543 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
121 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
122 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
1k 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
188 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
460 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
263 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 ...
6
votes
1answer
626 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
86 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
348 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
26 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
339 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
90 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
312 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
329 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
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
51 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
439 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
6k 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
301 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
99 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 ...
9
votes
5answers
60k 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
50 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
541 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
330 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
11k 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
110 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
736 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
366 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
446 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
381 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
161 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
511 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 ...