LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Closed Thread
  Search this Thread
Old 05-27-2008, 11:49 AM   #1
p_raju
LQ Newbie
 
Registered: May 2008
Posts: 11

Rep: Reputation: 0
Question 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

Last edited by p_raju; 05-27-2008 at 11:50 AM.
 
Old 05-27-2008, 12:11 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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.
 
Old 05-28-2008, 10:50 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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/
 
  


Closed Thread

Tags
fuser



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save output of 'fuser' to a file p_raju AIX 5 05-31-2008 04:18 AM
how to save output from a command to a variable? tomolesonjr Linux - Newbie 6 04-19-2006 03:04 PM
Screen Listing Output Save in a File rolly frando Linux - Newbie 3 07-04-2005 01:23 AM
How do I save the output from a program? Fe98 Programming 4 11-10-2003 09:18 AM
PHP: save output to a file mikeshn Programming 2 10-25-2003 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration