Link to home
Start Free TrialLog in
Avatar of sunhux
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/fdinfo/6â: No such file or directory  <==
find: â./proc/22063/fdinfo/6â: No such file or directory <==
./run/utmp
./run/log/journal/ad6b737370874b7282a5c951c384d844/system.journal
./run/systemd/generator.late/vmware-tools.service

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
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial