I have two directories A and B. Each one contains a zip.
How can I write the path of these two zip files into a text file?
Example for the directory system:
FILES/ONE/one.zip
FILES/TWO/two.zip
And I want to run the command from FILES directory
bashcommand linefindtext processing
I have two directories A and B. Each one contains a zip.
How can I write the path of these two zip files into a text file?
Example for the directory system:
FILES/ONE/one.zip
FILES/TWO/two.zip
And I want to run the command from FILES directory
Best Answer
You can use the
find
command, with its output directed to a file, in the following way:Find every file ended with
zip
inside the current folder (FILES
) and print it pathThe output of the
find
command is directed into a text file:The content of the
outfile.txt
is:e.g. when find output is directed to
stdout