Q:

How to get paginated files from directory?

Is it possible to list files from directory based on pagination scope.
for example. 
ls 0,50
ls 50,100
ls 100,150

Actually we have ton of files inside directory and while displaying those files in view takes lot time if i display all files in one shot. instead i wanted to paginate result of files inside directory.

A:

You could use
ls | tail -n <line number of the first line> | head -n <number of lines that you want>

e.g.
ls | tail -n 10 | head -n 20

Would display 20 filenames, starting at the 10th one.

