Can’t delete file on mac osx

Like: Unable to change file mode on Edge Of Tomorrow.m4v: Operation not permitted

chflags nouchg /path/to/item

chflags -R nouchg /path/to/

although, sometimes you need to close the app that has it locked, VLC, commander one and others can all lock files

access denied mac

operation not permitted mac

How to grep sideways

‘grep’ping for a word in a giant one line file is tough, here’s how to do it:

grep -E -o “StringToFind.{1,150}” /path/to/file.php

and then stack other grep’s if needed

like getting a service user for instance0:

su – `ps -ef|grep ance0 |grep -E -o “u01.{1,20}”|cut -f 2 -d \/|sort|uniq`