# Method 1
for f in sometext_*.jpg
do
mv -v "$f" "$(echo "$f" | sed -e 's/sometext_//' - )"
done
# Method 2
find . -name "sometext_*.jpg" | while IFS= read -r f; do
mv -v "$f" "$(echo "$f" | sed -e 's/^\.\/sometext_//' - )";
done
• | Examples of the wget command |
• | Examples of the curl command |
• | Examples of the zip command |
• | Delete a batch of files using a regular expression with the find command |