-vIn the jazz world, John Coltrane still rules nearly 40 years after his death; likewise, Led Zeppelin is recognized as one of the great all-time rock 'n' roll bands. While they were together, Led Zeppelin released nine albums; however, many of them had the band's name in the album title (yes, the fourth release didn't really have a title, but most critics still recognize it as Led Zeppelin IV, so humor me). What if you want to see a list of MP3 folders containing Led Zeppelin's albums, but exclude those that actually have the words Led Zeppelin in the title? With the -v (or --invert-match) option, you can show only results that do not match the given pattern. $ ls -1 1969_Led_Zeppelin 1969_Led_Zeppelin_II 1970_Led_Zeppelin_III 1971_Led_Zeppelin_IV 1973_Houses_Of_The_Holy 1975_Physical_Graffiti 1976_Presence 1979_In_Through_The_Out_Door 1982_Coda $ ls -1 | grep -v Led_Zeppelin 1973_Houses_Of_The_Holy 1975_Physical_Graffiti 1976_Presence 1979_In_Through_The_Out_Door 1982_Coda With -v, you can really start to funnel your results to show only the exact items you need. You won't use -v all the time, but when you need it, you'll be glad it's available. |