Advertisement
v1ral_ITS

cp or mv entire list of files to a destination [ terminal ]

Jun 19th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/bin/bash
  2. [[ $EUID -ne 0 ]] && echo "This script must be run as root." && exit 1
  3. read -p "Cat What Find File List: " LST
  4. read -p "Destination To cp[or]mv Files: " DST
  5. read -p "Type cp (OR) mv : " CPMV
  6. for file in `cat $LST`; do $CPMV "$file" "$DST"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement