1

How to count number of files in directory and write to new file with number of files and their name?

view story
linux-howto

http://www.unix.com – Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Code: Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- 25. last file.dat (HowTos)