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 ...
0
votes
1answer
15 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
12 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
26 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
37 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 ...
0
votes
0answers
19 views
Mac Single User mode view flash drive
After accidentally deleting /etc instead of /efi (rEFIt stuff), I left my mac Unbootable. I have a flashdrive and I want to copy a few files to it in single-user mode before I restore the system. I ...
1
vote
0answers
29 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
21 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
121 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
90 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
57 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
58 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 ...
2
votes
1answer
77 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 ...
1
vote
1answer
35 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 ...
0
votes
0answers
38 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
20 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
54 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
46 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
57 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 ...
0
votes
0answers
11 views
Receiving dynamic_pager notices in Applescript
The dynamic_pager daemon also provides a notification service for those applications which wish to receive notices when the external paging pool expands or contracts.
How my AppleScript can ...
2
votes
1answer
89 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
74 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 ...
0
votes
1answer
292 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
34 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 ...
0
votes
1answer
51 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 ...
3
votes
2answers
390 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 ...
2
votes
0answers
87 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
71 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 ...
0
votes
0answers
36 views
What system is more customizable/open - Mac OS X or Mac OS 9? [closed]
As Mac OS (X) is generally considered as less customizable and less open system than Windows or Linux, I wonder if this is true for Max OS X which is as we know based on Unix. Maybe in fact Mac OS X ...
3
votes
4answers
5k 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
30 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 ...
0
votes
0answers
48 views
PS command ouput limited to 80 bytes only [closed]
The output of PS command only returns 80 bytes
args The command with all its arguments as a string. The
implementation may truncate this value to the field
width; it is ...
-2
votes
1answer
285 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
146 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 ...
0
votes
0answers
30 views
Unix Log Exception Check [closed]
I have a log file which needs to be checked every 15mins for "Failed - System Error:". If the error is repeated for more than 2 times in the given 15mins report via mail.
o/p shld be timestamp and ...
-1
votes
3answers
4k 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
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
1answer
230 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 ...
1
vote
1answer
258 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
220 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
132 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
103 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
37 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
291 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 ...
0
votes
0answers
22 views
Will this bitscrubber in fact scrub away bits rather than writing to a new file?
I have a Unix-y bash script and a Python script:
#!/bin/bash
for item in $*
do
for file in `find $item -type f`
do
bitscrubber_internal $item
done
rm -rf $item
done
and
...
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?
0
votes
1answer
384 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
694 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
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 ...
1
vote
1answer
26 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 ...
