I have a directory containing 0.5 million text files, and I want to open one or more with vim to check the text pattern. How can I get same ten file names quickly to open as samples? All the file names are unknown.
I've tried ls directory
, only to find that it's too slow to finish listing all the files. Please don't provide me with answers which need checking time stamps or others like randomly or something else. Here the point is time. As fast as possible.
I get to know from @the_velour_fog that there is a direct solution using vim (:args `find . -type f | head -n10`, if someone doesn't need to run vim with plugins like nerdtree and etc this method is highly recommended) but please give me a Ubuntu answer.