
한 문자만 바꾸려는 경우 파일 이름을 바꾸는 더 짧은 방법이 있습니까? 기본적으로 다음을 입력하지 않고도 이름을 alex_is_my_best_pan.txt
다음과 같이 바꾸고 싶습니다 .alex_is_my_best_pal.txt
mv alex_is_my_best_pan.txt alex_is_my_best_pal.txt
, 꽤 지루합니다.
감사해요!
답변1
bash
괄호 확장을 사용할 수 있습니다 .
mv alex_is_my_best_pa{n,l}.txt
이로 인해 전체 단어가 해당 위치에서 주어진 순서대로 한 번, 한 번은 {n,l}
두 번 반복됩니다 .n
l