Deprecated: Creation of dynamic property ET_Builder_Module_Comments::$et_pb_unique_comments_module_class is deprecated in /home/softcrea/public_html/wp-content/themes/Divi/includes/builder/class-et-builder-element.php on line 1425

Bash: List all files but ignore some

by | Dec 3, 2015 | Automation, Bash, Shell, Test Automation | 0 comments

Written By Ola Ajibode

On the commandline (terminal) in the *nix world, when you need to list all the files in a directory but ignore some based on file extension e.g. pdf, sh, tsv etc. Then the command below is quite appropriate. Remember to update the list of extensions you want to ignore i.e. “sh|tsv|rb|properties”

ls -l | grep -Ev '\.(sh|tsv|rb|properties)$' | column

Let me know if this is useful.

Written By Ola Ajibode

undefined

Explore More Insights

Docker:  Stop all containers now!

Docker: Stop all containers now!

Docker has changed our world. A very useful component in the toolbox of any Software Engineer or perhaps, any forward-thinking company. What is Docker? Why Docker? and other questions relating to the topic starts here: Docker Sometimes, you are just too annoyed with...

read more
Bash:  Delete History in Terminal

Bash: Delete History in Terminal

Sometimes while working on the terminal or commandline as you know it, the history becomes clogged with simple common commands like ls -al and you want to remove X number of lines to keep your history compact and relevant.  Here's a simple command that...

read more

0 Comments

Submit a Comment