« first day (2937 days earlier)      last day (2019 days later) » 

6:21 AM
@AaronHall Because MacOSX is based on BSD, and Linux is based on SysV. A lot of things are subtly different.
 
7:05 AM
You can see it in e.g. the arguments to ps as well - I keep having to think about them when I switch between systems.
 
 
1 hour later…
8:27 AM
Good morning!
 
9:22 AM
Morning
 
 
3 hours later…
11:57 AM
@AaronHall GNU tools use \| to do alternations in basic regular expressions. Basic regular expressions does not have alternation, so this is a GNU extension to them. To use alternations, you would need to use an extended regular expression. With find on macOS, you do that by using find -E -regex .... Note that \( would be a literal parenthesis in an ERE, you you probably want to use ( (no escape) for grouping, and don't escape the | either.
In other words: find . -E -regex '^.*(__pycache__|.py[co])$' -delete
Or just find . -name '*__pycache__' -o '*.py[co]' -delete, which would be portable.
(for a flexible definition of "portable" obviously, since that still uses -delete)
Ping @JennyD too on the above, if you're interested.
And here's a photo of our two cats, to brighten your day: instagram.com/p/BpRy29XFXV7
@JennyD Sadly, you might have to start rephrasing that as "macOS tools are based on FreeBSD", as the tools vary somewhat across the various BSD systems... Most of it is similar, but some of it is not. OpenBSD find only acquired -delete the other year, for example, and there is a lot more separate development than code sharing happening.
 
Hello
 
 
2 hours later…
2:23 PM
@Kusalananda should that be find . \( -name '*__pycache__' -o -name '*.py[co]' \) -delete? i.e. doesn't the "or" condition need parens so that -delete doesn't bind to just the second part
 
 
2 hours later…
4:15 PM
@ilkkachu So it is.
 
 
3 hours later…
7:15 PM
@Kusalananda Your cats look very serious. Are they plotting world domination?
 
7:45 PM
are questions about the linux subsystem for windows on-topic on this stack?
hmmm I see the tag, so I guess it must be.
 

« first day (2937 days earlier)      last day (2019 days later) »