sunhux
asked on
Shell script find problem with /proc
I've tried 3 various commands but still getting the 2 lines of "... â./proc/22063" messages below:
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "/proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null |grep -v "find:"
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "^/proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null
will persistently give the following:
========================== =
find: â./proc/22063/task/22063/f dinfo/6â: No such file or directory <==
find: â./proc/22063/fdinfo/6â: No such file or directory <==
./run/utmp
./run/log/journal/ad6b7373 70874b7282 a5c951c384 d844/syste m.journal
./run/systemd/generator.la te/vmware- tools.serv ice
Basically I'm trying to do a Clam AV scan & that 2 lines interferes:
DIR2SCAN=$(find / -type f -mtime -1 -size +1 -size -25M -print |grep -v /proc |grep -v /dev |grep -v /sys 2> /dev/null)
clamscan -ri $DIR2SCAN >> /tmp/log
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "/proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null |grep -v "find:"
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "^/proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null
# find . -type f -mtime -1 -size +1 -size -25M -print |grep -v "proc" |grep -v "^/dev" |grep -v "^/sys" 2> /dev/null
will persistently give the following:
==========================
find: â./proc/22063/task/22063/f
find: â./proc/22063/fdinfo/6â: No such file or directory <==
./run/utmp
./run/log/journal/ad6b7373
./run/systemd/generator.la
Basically I'm trying to do a Clam AV scan & that 2 lines interferes:
DIR2SCAN=$(find / -type f -mtime -1 -size +1 -size -25M -print |grep -v /proc |grep -v /dev |grep -v /sys 2> /dev/null)
clamscan -ri $DIR2SCAN >> /tmp/log
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
EXPERT CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.