I wrote a very similar post nearly three years ago (in German) and still need this daily. As I’m currently writing a lot of Dockerfiles, I realised my post wasn’t completely accurate. Although I redacted it, it’s a good opportunity to port the original post to the english language.
Select all files in a directory, including hidden ones or files beginning with crude symbols. But exclude
.. as those will most likely lead to an exit code > 0.
Lets assume we want to
chown all files in the directory
Notice how we got a lot of strange filenames here, including files beginning with dashes or double dots.