Look at the find command. What you are looking for is something like find. Tom Tom 41k 28 28 gold badges silver badges bronze badges. This also converts test. So not quite what OP asked for, but pretty close. As such, this answer isn't necessarily portable to non-GNU platforms. Excellent solution. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.
Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Added benefit of not breaking when you have MSalters Who has that many? The last time I had that many was when I forgot a split program was expecting bytes and not number of splitted files Happens all the time and more often than you think.
Niko Niko 5, 2 2 gold badges 34 34 silver badges 48 48 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 5. Related Here is the command to find all files in your present working directory.
In the above command we use dot. You can specify another directory if you want to search in another folder. The above command will display a list of all relative file paths. We use the output of above command in a for loop to iterate through these files and work with them. In the following code, you can fill the part between do…done with code to work with files.
We use -print0 option to display all filenames even if it includes spaces and other special characters.
0コメント