Search Results

Search: Posts Made By: varontron
Forum: Fedora 09-24-2009
6,074
Posted By varontron
okay, so what I recommend when you have the time...
okay, so what I recommend when you have the time is to read the man page for 'sh' or 'bash' which will explain how 'for' works, as well as backticks, redirects, substitution, etc.

also read the...
Forum: Fedora 09-24-2009
6,074
Posted By varontron
Ok, I checked your image. You are doing...
Ok, I checked your image.

You are doing this:
find $directory -type f -perm 666 -print | wc -l > results.txt
which is outputting the result of 'wc' to 'results.txt' Thus results.txt contains...
Forum: Fedora 09-24-2009
6,074
Posted By varontron
echo $count will display the value of 'count' but...
echo $count will display the value of 'count' but not of 'COUNT'.

what does 'echo $COUNT' display, or are you just typing in haste?
Forum: Fedora 09-24-2009
6,074
Posted By varontron
can you post the script? the find ..-exec...
can you post the script?

the find ..-exec flag is for operating on every find result. Think of batch renaming, archiving, or deleting.
Forum: Fedora 09-24-2009
6,074
Posted By varontron
COUNT=`wc -l results.txt|cut -f1 -d' '` cuts...
COUNT=`wc -l results.txt|cut -f1 -d' '`

cuts the first space delimited field, which is your value
Forum: Fedora 09-24-2009
6,074
Posted By varontron
the invalid arg error seems like it would have...
the invalid arg error seems like it would have been caused by mixing up the options and args (i.e. -user -u+6 rather than -perm -u+6)

the strange results could be caused by subdirectories. find...
Forum: Fedora 09-24-2009
6,074
Posted By varontron
find /path/to/$directory -user $username -perm...
find /path/to/$directory -user $username -perm -u+r,-u+w

this will give this list of files, i.e. you don't need a loop.
Showing results 1 to 7 of 7

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