Questions tagged [osx]

The command line and other Unix-like aspects of Apple's macOS (Mac OS X)

Apple's macOS (formerly known as Mac OS X) is a Unix variant built on a Mach/BSD-based kernel and FreeBSD-based userland. On this site, we cover the Unix-like aspects of the system, including the command-line interface, the filesystem, etc. Question about things that aren't Unix-like (including most of the graphical user interface) are covered at our sister site Ask Different.

See also if you're using/asking about the Darwin open source project.

1903 questions
212
votes
9 answers

ssh-add is not persistent between reboots

I added a ssh key to the agent by: $ ssh-add ~/.ssh/id_rsa_mac Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac) After a reboot the agent doesn't have this key added anymore: $ ssh-add -l The agent has no identities. Why…
Incerteza
  • 2,641
  • 4
  • 20
  • 22
180
votes
7 answers

What does the @ mean in ls -l?

I am using Mac OSX. When I type ls -l I see something like drwxr-xr-x@ 12 xonic staff 408 22 Jun 19:00 . drwxr-xr-x 9 xonic staff 306 22 Jun 19:42 .. -rwxrwxrwx@ 1 xonic staff 6148 25 Mai 23:04 .DS_Store -rw-r--r--@ 1 xonic staff …
Larry Wang
  • 2,625
  • 4
  • 20
  • 11
168
votes
1 answer

What does the "@" (at) symbol mean on OSX ls?

When I check permission of less files from the command line on my Snow Leopard OSX system using Bash I see -rw-r--r--@ for certain files and for others I just see -rw-r--r-- What does the @ mean here?
rhand
  • 1,845
  • 2
  • 12
  • 10
161
votes
14 answers

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little worried, as I was able to dd from the disk to the…
eckza
  • 2,179
  • 5
  • 16
  • 16
124
votes
11 answers

How can I install the `ll` command on Mac OS X?

I'm using Mac OS X. When I SSH into servers I find the ll command useful, but it's not available on my local machine. How can I install it?
Eonil
  • 4,607
  • 11
  • 30
  • 30
107
votes
7 answers

Is Mac OS X UNIX?

I had this argument recently saying Mac OS X was not UNIX, but Unix-like. I know there is a Single Unix Specification and those spec compliant could use the UNIX trade mark. Is Mac OS X a UNIX operating system or is it a Unix-like?
OscarRyz
  • 1,265
  • 3
  • 10
  • 8
104
votes
5 answers

Differences between sed on Mac OSX and other "standard" sed?

I am having some issues in using an answer provided on this site for this question about a sed command to replace a blank line with two other lines of content, and it was brought up if the sed command on Mac OS (10.6.7 for me) is different. I don't…
Peter Grill
  • 1,573
  • 3
  • 15
  • 19
103
votes
8 answers

How to install apt-get or YUM on Mac OS X

I want to use either of apt-get or yum. How to install them and make them successful running?
Karan-41317
  • 1,141
  • 2
  • 8
  • 5
93
votes
5 answers

Fix or alternative for mktemp in OS X

I'm looking at a bash script someone else wrote that uses mktemp: TEMP=`mktemp --directory` However, this line does not work on my machine (OS X 10.6). How would I fix this line so that it is cross-un*x-like-platform compatible? EDIT: An…
soundly_typed
  • 1,033
  • 1
  • 7
  • 6
88
votes
5 answers

How to persistently control maximum system resource consumption on Mac?

Before Mavericks, I could use /etc/launchd.conf file to change maximum system resource consumption, for example: limit maxfiles 16384 unlimited limit maxproc 16384 unlimited It no longer works in Mavericks. What is the correct way to do it in the…
Howard
  • 5,149
  • 5
  • 30
  • 34
83
votes
4 answers

How can I get the tac command on OS X?

I like to use tac to reverse the output of cat. However, it's not available in the Mavericks terminal. I tried to find it on MacPorts and again it's not available. Can anyone please show me how to get tac? It's very helpful for reading log files.
polarise
  • 1,021
  • 1
  • 7
  • 9
81
votes
4 answers

No sha256sum in MacOS

I tried to use sha256sum in High Sierra; I attempted to install it with MacPorts, as: sudo port install sha256sum It did not work. What to do?
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
80
votes
3 answers

lsof and listening ports

I am trying to get all the processes listening for a network connection on Mac OS X. netstat does not have the -p option and I am trying with lsof lsof -i -sTCP:LISTEN gives me a fair list of listening processes but not all. I can for example…
Matteo
  • 9,676
  • 4
  • 49
  • 66
69
votes
5 answers

File system compatible with all OSes?

I use Linux and Mac OS X on a regular basis, and sometimes I have to use Windows. I need to use a flash drive on all three, and I need a filesystem that will work well on all of them. None of the ext's work on Mac or Windows, HFS+ doesn't work on…
tkbx
  • 10,597
  • 13
  • 35
  • 41
69
votes
5 answers

How can I tell what version of OS X I'm on from the command line?

I frequently find myself SSHing into various OS X machines, and it'd be useful if I could tell what version of OS X I was on when I'm doing that. uname -a doesn't quite work, since Darwin kernel versions don't always change with the rest of the…
Benjamin Pollack
  • 985
  • 1
  • 7
  • 11
1
2 3
99 100