Question: I want to get a numbered list of files, e.g. if I have these files:

```
a.pdf
b.pdf
c

```

then it should be listed as:

```
1 a.pdf
2 b.pdf
3 c

```

Answer: 
You can do it two ways:-  

1st one :-  

`ls -1 | awk '{print NR,$0}'`

2nd one:-  

`ls -1 | cat -n`  

You must prefer 2nd one but choose whatever you like. :-)
If your system has command `nl`, it will be easier. ( I can confirm `nl` command is exist in cygwin, aix and solaris system, then it should be popular command in most unix system)

```
ls |nl

```