Are there alternatives to pgrep
and pkill
commands on Mac OS X or should I just create aliases for them using other commands available for me?
I need to get the size of directory in terminal for signing purposes. I’m using following command:
I’ve just been looking through a few man pages for a few different commands including grep and ifconfig. I’ve noticed over a few pages, the…
I am creating a script which clears the cache for Google Chrome. However, I would like to check if Chrome is open and if so not run the code but if it isn’t then it will execute the code. I can see that the Process Name is Google Chrome but the code doesn’t work.
So I’ve been using ‘sed’ on linux for a while, but have had a bit of difficulty trying to use it on OSX since ‘POSIX sed’ and ‘GNU sed’ have so many little differences. Currently I’m struggling with how to insert a line of text after a certain line number. (in this case, line 4)
Say I plug in several USB drives which don’t get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example?
I know that macOS is a UNIX operating system, but I don’t know whether macOS could be called a UNIX distribution in the same way Gentoo or Debian are GNU/Linux distributions.
By default ifconfig
will show me all available interfaces , but what if I just want to display active
ones? Like, en0
only in below.
This ought to be really simple, but for some reason it is not working: