특정 문자가 들어간 파일 이름 변경
파일이름에 특정 문자(단어)가 있는 경우 일괄 수정하는 스크립트를 작성한다.
find /file/path -type f -print0 | while IF>
newfile=$(echo "$file" | sed 's/특정문자//')
if [ "$file" != "$newfile" ]; then
mv -v "$file" "$newfile"
fi
done
파일을 change_name.sh 로 저장 후 실행한다.
sudo bash change_name.sh#파일이름변경 #파일이름_일괄수정 #파일이름수정
댓글 0
등록된 댓글이 없습니다.
로그인 후 댓글을 작성할 수 있습니다.