This command prints files/directories in the working directory having a basename starting with a period (a.k.a. hidden entries), non recursively.
find . -maxdepth 1 -name '.*'
To print everything but those hidden entries I expected the following command to work … but nothing gets printed.
find . -maxdepth 1 -name '.*' -prune -o -print
I ran those commands in my home directory where some non hidden entries exist like Documents, Downloads directories, some miscellaneous files etc which I expected to be printed.
Can someone explain me why?