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
  • 53
  • 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
  • 176,835
  • 32
  • 241
  • 292