Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
for i in $(find / -type d -perm /o+w -regextype posix-extended -not -iregex "(/proc.*|/tmp.*)"); do find $i -type f -user root -ls; done | tee /tmp/baddies
Cheers,
Tink
Click here to see the post LQ members have rated as the most helpful post in this thread.
for i in $(find / -type d -perm /o+w -regextype posix-extended -not -iregex "(/proc.*|/tmp.*)"); do find $i -type f -user root -ls; done | tee /tmp/baddies
Cheers,
Tink
I m getting following error after executing some part of script.Here it goes.
Is there anything worry about the error?
Code:
# find / -type d -perm /o+w -regextype posix-extended -not -iregex "(/proc.*|/tmp.*)"
find: warning: you have specified the -regextype option after a non-option argument -type, but options are not positional (-regextype affects tests specified before it as well as those specified after it). Please specify options before other arguments.
/dev/shm
/OVS.20101006-014041.orig
/etc/ovs-agent/db
/etc/ocfs2
/var/ovs
/var/ovs/mount
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/.ovs-agent
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/.ovs-agent/db
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/publish_pool
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/sharedDisk
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/running_pool
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/running_pool/RHEL55
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/iso_pool
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/iso_pool/OEL5.2_32bit
/var/ovs/mount/C9A30A22F0C5435F8F31376E95F54107/seed_pool
/var/ovs/mount.20101006-014018.orig
/var/ovs/mount.20101006-014018.orig/C9A30A22F0C5435F8F31376E95F54107
/var/ovs/mount.20101006-014018.orig/C9A30A22F0C5435F8F31376E95F54107/.ovs-agent
/var/ovs/mount.20101006-014018.orig/C9A30A22F0C5435F8F31376E95F54107/.ovs-agent/db
/var/tmp
/var/tmp/.oracle
/var/run/ovs-agent
/var/spool/samba
Still getting the same error.aint any one getting this error?
Quote:
# find / -perm /o+w -regextype posix-extended -not -iregex "(/proc.*|/tmp.*)" -type d
find: warning: you have specified the -regextype option after a non-option argument -perm, but options are not positional (-regextype affects tests specified before it as well as those specified after it). Please specify options before other arguments.
Here's an adjustment (re-ordering) of the options you are giving `find`, based on the warning message it is giving. NOTE that I did not get the same warning you are getting, BUT I *was* seeing /proc files/directories in my output when using the command you give there. After this re-ordering, I appear to be getting the right results, but you try it and see.
This would not be the first time that different versions of `find` have acted slightly differently on different systems..
Anyhow, see if this works for you (and if you like, maybe re-combine the -iregex statements into one, but whatever you like..)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.