This is quite an interesting and common question in linux: List all the files in a folder that are owned by a the user "trinh", with permissions "-rw-r--r-- " 1. The easiest way is to use ls command and chain filter with grep : ls -lt . | grep trinh | grep '\-rw\-r\-\-r\-\-' 2. But, if you don't want to escape these permission characters, you can use awk to translate them into number. So, we will translate " -rw-r--r-- " as following: + "-" : the first character indicates whether it is a file or a directory + "rw-" : the next 3 characters is the owner's right, can be translated to 110 which means 6 in decimal system. + "r--": next 3 characters is the group's right, is 100 in binary and 4 in decimal. + "r--": the last 3 characters is the other users's right, 100 in binary, and 4 in decimal. So, "-rw-r--r--" is 644 in decimal system. ls -lt . | grep trinh | aw...