I need to list the files on Directory. But only true files, not the folders.
Just couldn’t find a way to test if the file is a folder or a directory….
Could some one provide a pice o script for that?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about using
find?To find regular files in the current directory and output a sorted list:
To find anything that is not a directory (Note: there are more things than just regular files and directories in Unix-like systems):