I have a directory with a list of files like so:
1.html
1.html.v1
1.html.v2
2.html
2.html.v1
a.pdf
a.pdf.v1
b.pdf
b.pdf.v1
b.pdf.v2
In bash, how can I list all the files that do not end with a .v[Number]?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
grep -vto filter away the.v[0-9]*stuff:For your example this gives