Hot answers tagged

4

That is because you are trying to use the GNU find, which is default in Linux, but Mac OS X comes with BSD find which has many differences. To install GNU find you will need Homebrew, pretty easy to install, just follow http://brew.sh/ After that you can install findutils: brew install findutils More info and other tools to mimic a Linux environment on ...


2

There is PureDarwin: http://www.puredarwin.org/ PureDarwin is the successor of OpenDarwin, and is a free, open source, community supported project to make Darwin more usable and compatible with non-Apple hardware. In reference to this question, PureDarwin is binary compatible as long as you do not rely on a library or other feature that is only available ...


2

If you run ps ax without the grep, you'll see the column headers: PID TT STAT TIME COMMAND ?? is in the TT column -- that's the controlling terminal for the process. The ?? indicates that the process isn't associated with a terminal. The U in the STAT column indicates that the process is in the uninterruptible sleep state. That explains why you ...


2

This is potentially related to El Capitan and its System Integrity Protection (csrutil status) which can affect the dtrace behaviour. The potential fix includes rebooting Mac into recovery mode (⌘-R at boot time), then in Terminal run: csrutil enable --without dtrace to keep SIP enabled, but disable DTrace restrictions (note: this is undocumented ...


2

You specify the section first: man 2 chmod See man man for tons of information (although not so much in the Mac OS X version), including the meaning of the section numbers; 2 is for system calls, so the chmod(2) manpage describes the chmod system call provided by the kernel. On Mac OS X the system call manpages are provided in Xcode Tools, which need to ...


1

I of course can't give you the answer to your situation, but I wan't to try and give you some ideas on it. First of all: use SSDs! I understood that you can't affort them yet, but you will definitely love them once you have them. And I assume it is a better idea to do this whole setup once and for all, not now and in a few month you have to do it all over ...


1

Another suggestion: You can also just buy a second hand brand name workstation (or build a custom one but I think it's not worth it) with 32/64gigs of ram and 2 x 8 core Xeon E5-2670s for instance (+hyperthreading, thus having 32 CPU threads), with 3 drives in RAID5 and install an OS as a hypervisor and have your 3 OS's in virtual machines. This way you can ...


1

Use find's -exec command: find ~/target_dir/ -iname '*some*' -depth 1 -exec mdls {} \; This will run mdls on every matching filename found by find. It will work with any filename, even those containing spaces or newlines etc. if mdls can work with multiple filenames on the command line, you could terminate the -exec command with + instead of \;. e.g. ...


1

pictures for review in video... ffmpeg can be used to assemble a set of images into a movie for review. The frame rate can be set to an interval of your choosing. Also, the video can be scrubbed, stepped through, or be played at various rates with program such as VLC media player. #!/bin/bash cd "/path/to/png/files" echo "DIRECTORY:" `pwd` > ...


1

You can reach a good-enough result by using temporary files: my_file=file.txt #or =$1 if in a script #create a file with all the lines to discard, numbered grep -n -B1 -A5 TBD "$my_file" |cut -d\ -f1|tr -d ':-'|sort > /tmp/___"$my_file"_unpair #number all the lines nl -nln "$my_file"|cut -d\ -f1|tr -d ':-'|sort > /tmp/___"$my_file"_all #join the ...


1

The pdfinfo command line tool is part of the xpdf package: brew install homebrew/x11/xpdf This package installs many things, including pdfinfo.


1

lsof provides information about files opened by processes, including network ports. It's available on pretty much all unix systems, including OSX. The Rosetta Stone for Unix doesn't list any other tool for “match process to file or port” on OSX. To list processes listening on a TCP port, you can use lsof -iTCP -sTCP:LISTEN lsof -iUDP lists processes ...


1

The output of man is not pure text. Try to use man perl | col -b instead.


1

My El Capitan has no setattr or setxattr (the latter is the name of a C runtime function: you could make your own utility using that). OSX provides xattr, which (noting comments such as Mac OS X Extended Attributes and Xattr) seems fairly recent. A comment in Manually set extended attributes on arbitrary files from 2011 gives a hint about OSX 10.5 You can ...


1

Apple doesn't install it (afaik), so you'll need Fink or MacPorts or homebrew or a manual install. Assuming a properly configured PKG_CONFIG_PATH for Fink or MacPorts or homebrew or the manual install, in this case MacPorts, pkg-config might indicate the presence of gsl (and, bonus, the various compiler flags to use). % echo $PKG_CONFIG_PATH ...



Only top voted, non community-wiki answers of a minimum length are eligible