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
Shell ScriptingScripting Languages

Avatar of undefined
Last Comment
David Favor
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
EXPERT CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Scripting Languages
Scripting Languages

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

30K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo