Tag Info

Hot answers tagged

38

OS X is certified as UNIX by The Open Group. Currently OS X 10.8 (Mountain Lion) and 10.6 (Snow Leopard) are so certified. OS X 10.7 (Lion) never was certified, that I saw. (I checked the Apple page on the Open Group's web site periodically, expecting to need to update this answer.) Since Apple chose to get 10.8 certified, I assume Apple also chose to skip ...


37

The whole ABI is different, not just the binary format (Mach-O versus ELF) as sepp2k mentioned. For example, while both Linux and Darwin/XNU (the kernel of OS X) use sc on PowerPC and int 0x80/sysenter/syscall on x86 for syscall entry, there's not much more in common from there on. Darwin directs negative syscall numbers at the Mach microkernel and ...


34

In some sense, it is a UI convention with history that goes back all the way to 1984. Since Windows and X11 both post date the original Mac GUI, one might say that Windows does it the Windows way "just to be different" rather than suggesting that the Mac is the oddball. Back in the earliest days of the Macintosh, you could only run one application at a ...


32

You can send dd a certain signal using the kill command to make it output its current status. The signal is INFO on BSD systems (including OSX) and USR1 on Linux. In your case: kill -INFO $PID You can find the process id ($PID above) with the ps command; or see pgrep and pkill alternatives on mac os x for more convenient methods. As an example on Linux, ...


27

It indicates the file has extended attributes. You can use the xattr command-line utility to view and modify them: xattr --list filename xattr --set propname propvalue filename xattr --delete propname filename


27

The history of MacOS is a little bit more convoluted. I was very interested in this in the late 90's as Mach had been pitched around the world as a faster way of building a Unix system. The origin of the kernel is a bit more complicated. It all starts with AT&T distributing their operating system to some universities for free. This Unix was ...


23

Three reasons: First, being certified as a Unix says nothing about your licensing, just your compliance to the established standards for being Unix. Second, because being Unix has nothing to do with your licensing, and everything to do with your being like Unix, an originally proprietary system, and one with a long legacy. Finally, don't mistake ...


22

Terminal is a terminal emulator. It interprets various control sequences sent by programs (control characters like CR, LF, BS and longer control sequences for commands like “clear screen”, “move cursor up 3 lines”, etc.). Terminal is the same kind of program as xterm, rxvt, Konsole, or GNOME Terminal. Almost all modern terminal emulators support the “xterm” ...


18

On the Unix side, OS X is a descendant of NeXTSTEP, which was derived from 4.3BSD with the core parts of the kernel replaced with Mach. The NeXT programming API, which eventually came to be called OpenStep, is the basis of today's Cocoa API for OS X. Obviously there have been 10 years further development on Cocoa, so the two APIs have diverged, though ...


17

bash actually remembers the times until you close the shell. So try running HISTTIMEFORMAT='%x %X ' history If you also put HISTTIMEFORMAT=<some format> in your ~/.bashrc, it will also get written to ~/.bash_history on exit, so you can check what happened in previous shell sessions too.


16

The answer that suggested system_profiler | grep 'System Version' is what I have tried to use in the past, but it has 2 problems. It is slow since it generates a full system_profiler dump of the machine, gathering all hardware and software inventory information. The output of system_profiler has changed over time. e.g. output of grep for 'Serial Number' ...


14

Why OSX applications won't run natively on linux: First of all OSX uses a different binary format than Linux, so Linux can't execute binaries compiled for OSX (the same way it can't execute binaries compiled for Windows or BSD). Second of all, if you're talking about GUI applications, Apple's GUI toolkit Cocoa a) is only available for OSX and b) does not ...


13

Don't try to parse find output except as a last resort. It is important to realize that on Unix file systems, file names are not strings (a common misconception) but rather binary blobs which can contain any character except / and the null character. Parsing file names safely and correctly is enough of a pain that 99% of the time you'll just want to avoid ...


12

OS X is the only remaining operating system based on the Mach microkernel which is also still commercially relevant. There are a few ongoing research projects and obsolescent OSes that no doubt are still being used in production settings on old machines, but nothing you can go out and buy on a new machine today. OS X has the usual assortment of kernel ...


11

I can answer only for Ubuntu. In Ubuntu the root user has a locked password. From passwd man page: -l, --lock Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a '!' at the beginning of the password). You can see the ! ...


10

The easiest way is: $ sw_vers -productVersion 10.6.4 From http://tinyapps.org/blog/mac/201008140700_os_x_version_terminal.html: $ sw_vers ProductName: Mac OS X ProductVersion: 10.6.4 BuildVersion: 10F569 $ sw_vers -productVersion 10.6.4 Especially handy when resetting a password in single user mode, since the method varies based on which ...


10

One simple way is to turn on vnc screen sharing by going to System Preferences -> Sharing -> Screen Sharing on the machine you want to share. For client compatibility reasons you may need to select both "Anyone may request permission to control this screen" and the "VNC viewers may control this screen with a password" checkboxes. Once you've set up the ...


10

He didn't know what he was talking about. There are a couple things I can think that he's talking about: The user logs in as a non-superuser, so user processes can't simply load modules or make changes to the kernel in other ways. (of course, any macosx viruses would exploit flaws in the kernel to bypass that, or just use social engineering to get the ...


10

UDF is a candidate. It works out-of-the-box on linux >= 2.6.31, Windows >= Vista, MacOS >= 9 and on many BSDs. Note: UDF comes in different versions, which are not equally supported on all platforms, see Wikipedia - Compatibility. UDF can be created on linux with the tool mkudffs from the package udftools.


9

The @ suffix is unique to Mac OS and is covered by this question, so I copied this part of my answer from there; it means the file has extended attributes. You can use the xattr command-line utility to view and modify them: xattr --list filename xattr --set propname propvalue filename xattr --delete propname filename The + suffix means the file has an ...


9

The window is not the application in MacOS, in MacOS the windows connects to the application. That is why the application don't exit when you close a window. On Windows the window is the application, that is why the the application should exit when you hit the exit button. On Linux the developer decide what architecture he like to use, both ways is ...


9

Normally, du shows information about disk usage (which is where its name comes from). Keep in mind that disk usage != sum of file sizes Because each file takes up a number of blocks on the filesystem (see man mkfs.ext2 for example). This means that only in a very rare situation a disk usage of a file equals its actual size - for that, the size must be ...


8

You could use MacPorts: sudo port install proctools Here's the result of port search pgrep: proctools @0.4pre1 (sysutils) pgrep, pkill and pfind for OpenBSD and Darwin (Mac OS X)


8

For dd, you can send a signal. For other commands that are reading or writing to a file, you can watch their position in the file with lsof. lsof -o -p1234 # where 1234 is the process ID of the command lsof -o /path/to/file If you plan in advance, pipe the data through pv.


8

First of all, the shell is globbing the '*' for you. Either escape it with \ or use quotes around *.html Like so: find myDir -name "*.html" or find myDir -name \*.html Skip the use of xargs with find's -exec switch: find myDir -name "*.html" -exec cp {} ~/otherDir \; This works because {} takes the place of the file that find found, and is executed once ...


8

The behavior of shell utilities does differ in minor ways between unix variants. There are many unix variants, with a complex history. There are standardisation efforts such as the POSIX standard and its superset the Single UNIX specification. Most systems nowadays implement POSIX:2001, also known as the Single UNIX Specification version 3, with minor ...


8

So, after some digging, it transpires that the system vimrc shipped with OSX sets the modelines (note the trailing 's') variable to 0. This variable controls the number of lines in a file which are checked for set commands. Setting modelines to a non-zero value in my .vimrc solved the problem. Full output, for the curious: the output of vim --version ...


8

As the comments point out, make sure you are using regular ascii quotes like " and ' (the characters with ascii codes 0x22 and 0x27) The BSD version of sed used by Mac OS X is slightly different from the GNU sed, take for example this command: sed -i s/foo/bar/ file1.txt file2.txt The GNU version will perform the replacement s/foo/bar/ in file1.txt and ...


8

One way to do this is by specifying -o PasswordAuthentication=No as part of your SSH command: ssh -o PasswordAuthentication=no user@server This removes PasswordAuthentication from the list of authentication choices that the SSH client has to talk to the server, prevent you from sticking on the Password prompt. Note that this also allows other ...


8

Based on the error message that you get, I don't think /dev/urandom is the problem. If it were, I'd expect an error like "no such file or directory". I searched for the error message you got and found this, which seems like it might be relevant to your issue: http://nerdbynature.de/s9y/?176 Basically, specify the locale by prepending the tr command with ...



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