To invert the match (i.e., show those that don’t match the given express), use -v. In the example below, it shows everything in the current directory except for package.json
ls | grep -v package.json
To invert the match (i.e., show those that don’t match the given express), use -v. In the example below, it shows everything in the current directory except for package.json
ls | grep -v package.json