![사용자는 centos 7 스크립트에서 경로와 크기를 변수로 입력합니다.](https://linux55.com/image/173549/%EC%82%AC%EC%9A%A9%EC%9E%90%EB%8A%94%20centos%207%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EC%84%9C%20%EA%B2%BD%EB%A1%9C%EC%99%80%20%ED%81%AC%EA%B8%B0%EB%A5%BC%20%EB%B3%80%EC%88%98%EB%A1%9C%20%EC%9E%85%EB%A0%A5%ED%95%A9%EB%8B%88%EB%8B%A4..png)
사용자가 find 명령에 대한 입력으로 사용할 특정 파일 경로와 크기를 입력할 수 있는 스크립트를 작성하고 싶습니다.
나는 다음을 시도했다:
echo "Enter file path and size":
read userpath
read sz
find $userpath -size $sz -exec rm {} \;
하지만 이로 인해 오류가 발생합니다.
( find: invalid argument '-exec' to -size)
사용자가 find 명령에 대한 입력으로 사용할 특정 파일 경로와 크기를 입력할 수 있는 스크립트를 작성하고 싶습니다.
나는 다음을 시도했다:
echo "Enter file path and size":
read userpath
read sz
find $userpath -size $sz -exec rm {} \;
하지만 이로 인해 오류가 발생합니다.
( find: invalid argument '-exec' to -size)