1

I can list files with above extensions by

ls *[m,j,p][n,k,p][v,g]

But I want to list all files except these filetypes

0xManjeet
  • 33
  • 5

1 Answers1

1

You can use grep like this:

$ ls | grep -v '[\.jpg$|\.png$|\.mkv$]'

The grep command, filters out text that match provided regular expression. If -v flag is used, then it filters out text that do not match provided regular expression (reverse).

Pablo Santa Cruz
  • 170,119
  • 31
  • 233
  • 283