Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
As writen in subject, I have some problems using find with / directory. I want to list all the files on the system using: find /
It works fine on the command line. But when added in a script it displays nothing. So, if I write
Code:
for i in `find /`; do
echo $i
done
I get nothing. But when using some other directory it works fine, printing all the files in it. Does anybody have any idea. I asked a couple of people but nobody knows. Also tried it on several machines but the effect stays the same.
sure locate would fix the problem but not all machines the script will run on will have slocate database (not that they will not have it, but it should be done so they don't have to have it).
About the script: it's something like TripWire, it lists one file at the time, calculates it's md5 and sha1 digest, inode, owner, group, size ....
druuna:
Tried that before but it doesnt work.
Thank you both, but search for the soulution continues
There actually is nothing else than what i have posted before. Well the problem appears even if I write the part of the script shown above on the command line.
so:
for i in `find /`; do echo $i; done
does nothing for me.
Enjoy,
Luka
P.S. But the thing is: i've tried it on several machines running from *BSD to Slack. And nothing changes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.