LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to save output of 'fuser' to a file (https://www.linuxquestions.org/questions/linux-general-1/how-to-save-output-of-fuser-to-a-file-645100/)

p_raju 05-27-2008 11:49 AM

how to save output of 'fuser' to a file
 
Hi,

I am trying to make a script for checking the "*req" type of files which are not being used.The issue I am facing is, I am not able to save the output of fuser to any file. I tried following commands but not success.


find . -name "*req" -size +10000 -exec fuser {} >> spoolfile.txt \;

find . -name "*req" -size +10000 -exec fuser {} \; >> spoolfile.txt

Can anybody help me on this? or is there any other menthod is present for getting my work done?



Thanks and Regards,
P.Raju

colucix 05-27-2008 12:11 PM

From the fuser manual page
Quote:

fuser outputs only the PIDs to stdout, everything else is sent to stderr.
You have to redirect the standard error, too.

XavierP 05-28-2008 10:50 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here: http://www.linuxquestions.org/questi...a-file-645056/


All times are GMT -5. The time now is 02:11 PM.