Is there anyway I can list files by typing a command in the shell which lists all the file names, folder names and their permissions in CentOS?
Have a look at tree, you may have to install it first. Per default tree does not show permissions, to show permissions next to the filename run
which will recursively list all folders and directories within the current directory including permissions.
ls -lR lists the contents of directories recursively. The output is hard to process automatically, but for manual browsing it may be good because it's what you're familiar with.
find command lists files recursively. You can customize its output, for example the following command prints permissions like
ls -l does before each file name:
find -printf '%M %p\n'
This output can be processed mechanically if there are no newlines in your file names. If you replace
\n (newline) by
\000 (null byte), you can process the output with tools that support null-separated records.
find only print traditional unix permissions, not access control lists. For a recursive listing of all file permissions including ACL information, run
getfacl -R .
The output can be processed mechanically (special characters are sorted); in particular, it can be fed to
setfacl --restore to replicate the permissions to another tree with the same file names.