Tag Info

Hot answers tagged

6

First, this is about a lot more than just coreutils. The BSD equivalent to GNU findutils is also quite different, pretty much every command related to dynamic linkage is different, etc. And then on top of that, you have to deal with versioning differences: OS X still ships a lot of older software to remain on GPL2 instead of GPL3, such as Bash 3.x instead ...


5

The latest version of the HFS+ utilities on Debian are, as far as I can tell, from 2006 and lacking a maintainer. Apple released Time Machine in 2007, and when they did they introduced some quite significant changes to HFS+ (particularly to do with hard links to directories). It is highly likely that the HFS+ tools on Debian cannot deal very well with a Time ...


3

Many but not all Unix like system's uname have the n option uname -n


3

As the API returns JSON objects, I'd use a JSON parser for it, combined with sed and grep. I've decided for jq, which is contained in the Ubuntu repo's, so it could be installed using sudo apt-get install jq; I don't know what distro you are using, so you'll have to find that by yourself if you want to use this solution. jq ".[]" <filename> | sed ...


3

...per your comment on the question... pax -rws'/\.JPG$/.CAP&/' /root/of/copied/tree /dest/path If .jpg and .JPG are your only issues, that should just work. You can also add a print primitive to the filename substitution to get a list of all of those filenames which were changed: pax -rws'/\.JPG$/.CAP&/p' /root/of/copied/tree /dest/path As ...


2

Do you mean NDP for IPv6 as defined in RFC 2461? If so, there is ndp command for OSX. To quickly get results you can run: ndp -an


2

Mac OS X is one of the few Unix-like systems that lets you store and retrieve a name totally distinct from the computer's IP hostname. It's probably best to special-case the call to scutil; if that fails, fall back to the more standard hostname: echo "Welcome, $(whoami), to $(scutil --get ComputerName 2>/dev/null || hostname)."


2

That should do it: grep -rlZ "wrongtext" ~/Library/Calendars | xargs -0 sed -i '' 's/wrongtext/righttext/g' I added the -Z parameter to grep to add a zero byte instead of a newline after every filename. So the command works also with strange filenames. xargs then reads the input delimited by the zero byte with -0 and calls the sed command.


1

According to this page, you can use: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist


1

2 shots: 1. Perhaps login as root is denied (that's the default setting on many systems and it is pretty reasonable). Did you tried with a different user? 2. Did you try sshing with ssh -Y?


1

Figured it out. It does not like the -O grep -rlZ "wrongtext" ~/Library/Calendars | xargs sed -i '' 's/wrongtext/righttext/g'


1

Here's a brief stab: # for f in $( find yoursourcedirectory -name \*.jpg ) ; do cp ${f} yourtargetdirectory/${f}.CAP1.jpg ; done then # for f in $( find yoursourcedirectory -name \*.JPG ) ; do cp ${f} yourtargetdirectory/${f}.CAP2.jpg ; done This will take all the files named *.jpg in the source, and copy them over as *.CAP1.jpg and all of the *.JPG ...


1

0xC0000022L's answer is thorough for the Windows side of things. The Mac can recognize Linux's symlinks; however Linux cannot recognize aliases made in the Mac's Finder (symlinks created using ln -s work fine).


1

Homebrew also has a recipe for rpm installation, just run brew install rpm



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