How to use find command to find all files with extensions from list?
I need to find all image files from directory (gif, png, jpg, jpeg). find /path/to/ -name “*.jpg” > log How to modify this string to find not only .jpg files? 10 Answers 10
I need to find all image files from directory (gif, png, jpg, jpeg). find /path/to/ -name “*.jpg” > log How to modify this string to find not only .jpg files? 10 Answers 10
I would like to set a job to run daily in the root crontab. But I would like it to execute it from a particular directory so it can find all the files it needs, since the application has a bunch of relative paths. Anyway, can I tell crontab to run from a particular directory? … Read more
Is it possible when listing a directory to view numerical unix permissions such as 644 rather than the symbolic output -rw-rw-r– Thanks. 9 Answers 9
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 9 years ago. Improve this question What is the difference between tar and zip? What are the use cases for each? 1 Answer 1
I am doing a find and then getting a list of files. How do I pipe it to another utility like cat (so that cat displays the contents of all those files) and basically need to grep something from these files. 15 Answers 15
I have gotten the following to work: for i in {2..10} do echo “output: $i” done It produces a bunch of lines of output: 2, output: 3, so on. However, trying to run the following: max=10 for i in {2..$max} do echo “$i” done produces the following: output: {2..10} How can I get the compiler … Read more
I want to list only the directories in specified path (ls doesn’t have such option). Also, can this be done with a single line command? 22 Answers 22
What is the simplest way to remove all the carriage returns \r from a file in Unix? 21 Answers 21
Is there a method to colorize the output of cat, the way grep does. For grep, in most consoles it displays a colored output highlighting the searched keywords. Otherwise, you can force it by calling grep –color Is there a generic way to color the output of any program according to your personal choice. From … Read more
Is it possible to use the find command in some way that it will not recurse into the sub-directories? For example, DirsRoot |–>SubDir1 | |-OtherFile1 |–>SubDir2 | |-OtherFile2 |-File1 |-File2 And the result of something like find DirsRoot –do-not-recurse -type f will be only File1, File2? 4 Answers 4