Advertisement
haitch

Ubuntu: ls with RegEx

Apr 25th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.16 KB | None | 0 0
  1. #find all images that ends with (-)\d.jpg$
  2. ls | grep "\-[[:digit:]]*.jpg$"
  3.  
  4. #ls and copy
  5. ls | grep "\-[[:digit:]]*.jpg$" | xargs -0 cp {} destination_folder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement