LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 05-27-2008, 11:49 AM   #1
p_raju
LQ Newbie
 
Registered: May 2008
Posts: 10

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
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 8,992

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
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: Lubuntu
Posts: 19,067
Blog Entries: 4

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration