How to view text files in a directory and in all its subdirectories, as well as subdirectories of directories (and so on, until all the folders run out).
Closed due to the fact that off-topic participants aleksandr barakin , Enikeyschik , LFC , freim , 0xdb Feb 23 at 16:49 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- " Learning tasks are allowed as questions only on the condition that you tried to solve them yourself before asking a question . Please edit the question and indicate what caused you difficulties in solving the problem. For example, give the code you wrote, trying to solve the problem "- aleksandr barakin, Enikeyschik, LFC, freim
|
2 answers
find {Your_Directory_No_Braces} -type f -name '*.txt' | xargs cat
- oneFor easy viewing in the console, I would suggest:
find ... | xargs more | less
find ... | xargs more | less
find ... | xargs more | less
(more
in this mode will make a header with each file name before it, andless
will allow you to view the entire output, navigating through it with the ability to search for text) - avp
|
find ./ -type f -exec cat {} \; find ./ -type f -print0 | xargs -0 cat grep -r . ./ ls -R | xargs cat
Choose for specific needs. Describe what purpose.
|
$ man find
, optional$ man xargs
- aleksandr barakin