Effective list.

I want to make an equivalent lsin R. Let's say I want ls /a/b/c/201*/*/d/e/f/*/sameNameFile.gzthis command to take 5 seconds to run on the terminal, I tried to use it list.files, but this requires an argument pathand is needed recursive=TRUE. It takes age ...

Is there a function that I could use (or an option list.files) that would allow me to run this command ls(I know that I can run comamnd itself with system(cmd,intern=TRUE), but I want an R-solution)

+4
source share
1 answer

Related Question Result

Quick test if the directory is empty

, system("ls -f -R", intern = TRUE) , list.files. .

-R ; -f , .

+4

Source: https://habr.com/ru/post/1526952/


All Articles