Reputation: 101
I am trying to list all files in the current directory that have a file size higher than a variable set by the user:
find . -type f -size +$filesize
This returns the correct files over the file size set by the user, but I cannot figure out how to display the permissions alongside it.
Desired format:
FILENAME FILEPERMISSION
Upvotes: 2
Views: 126
Reputation: 3315
According to find(1) - Linux man page , something like this should work.
find -type f -size +$filesize -printf "%s\t %M\t %p \n"
Untested, as I am not on a linux box atm.
Upvotes: 2