creating a log file of users who are missing a file
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.
creating a log file of users who are missing a file
Hi,
I have created a shell script which searches users home directories based on their group membership and copies a file if it exists to my home directory. I would also like to create a logfile of all the users that do not have the file.
I am a newbie and there is probably a simple solution but I have been unable to find one.
I have created a shell script which searches users home directories based on their group membership and copies a file if it exists to my home directory. I would also like to create a logfile of all the users that do not have the file.
I am a newbie and there is probably a simple solution but I have been unable to find one.
Do you think you could share what you have so far?
Anybody got ideas they want to share with me to help resolve my problem. The code that I have so far is it OK? It seems to do what I want except I do not know how to create the logfile with the users names with no file to pick up.
I have tried using the code for creating the log file substituting the path for the logfile etc and am getting the following error
./testcode: [0: command not found
The files still get copied to the pickup folder though.
If I amend the code with the following
awk -F : '$4 =501{print$1}' /etc/passwd | while
read user
do
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.