How can i display the files only?

Hi!

How can i display only the ordinary files of a current directory? I don't want to show any directory or hidden file information.

Kindly share your thought.

Thanks in advance for your reply.

Regards.

Hi,

Use find command to display files only in the current directory.
First cd to that directory and then execute the following command
Usage :

find * -type f -print -o -type d -prune 2>/dev/null

If there are any sub-directories then they are all excluded.

***********************************************

If the sub-directories needs to be included the use the following

find * -type f -print 2>/dev/null

Hope this satisfies the requirement.

Let me know if you need any further help.....

ls -lA | awk '$NF !~ /^\./ && /^-/{print $NF}'

Thanks a lot. It is working.....