User enter path and size as a variable in centos 7 script
0
votes
0
answers
38
views
I want to write a script that allows the user to enter a specific file path and size to use as an input to the find command.
I tried the following:
echo "Enter file path and size":
read userpath
read sz
find $userpath -size $sz -exec rm {} \;
but it results in the error
( find: invalid argument '-exec' to -size)
Asked by karam albousy
(15 rep)
May 18, 2020, 06:36 PM
Last activity: May 19, 2020, 03:13 AM
Last activity: May 19, 2020, 03:13 AM