Shell snippets
A bit of magic for the shell.
Normalize file/directory permissions
Directories need execute (x) permissions to change (cd) into.
MIME types
Check MIME type of a file
1file -b --mime <file>
Alternatively, with the xdg-utils package.
1xdg-mime query filetype <file>
Be aware that it will first try to recognize the MIME type by file extension. If it fails, it will look at the content of the file.
NetworkManager
Get active connection
nmcli -g type,name connection show --active
← Go to parent