Search Results

Search: Posts Made By: Zwiebi
6,527
Posted By ahamed101
Try this... DIR=$( ls -d /home/* ) ...
Try this...
DIR=$( ls -d /home/* )


--ahamed
6,527
Posted By ahamed101
More generic would be to get all the users in the...
More generic would be to get all the users in the system and then search the home directories right?

--ahamed

---------- Post updated at 02:11 PM ---------- Previous update was at 01:51 PM...
6,527
Posted By ahamed101
Something like this? #!/bin/bash ...
Something like this?

#!/bin/bash

DIR="/home/UserA /home/UserB /home/UserC"
for dir in $DIR
do
user=$( basename $dir )
find $dir ! -user $user -exec echo "{}" is not owned by $user \;...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy