The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
filtering the logs prvnrk Shell Programming and Scripting 5 04-08-2008 10:57 PM
awk and sed filtering invinzin21 Shell Programming and Scripting 2 01-11-2008 03:56 AM
Filtering Data bobo UNIX for Dummies Questions & Answers 2 09-19-2007 04:06 PM
awk filtering ? varungupta UNIX for Advanced & Expert Users 4 09-17-2007 03:55 AM
Filtering Data Raynon Shell Programming and Scripting 7 09-05-2007 07:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-29-2004
videsh77 videsh77 is offline
Registered User
  
 

Join Date: Aug 2004
Posts: 144
Filtering out data ...

I have following command which tells me File size in GBs which are greater than 0.01GBs recursively in a dir structure.

ls -l -R | awk '{ if ($5/1073741824 >= 0.01) print $9, $5/1073741824 }'

But there are some files whom I dont have enough permissions, after executing this script
gives me error messages.

Now my task is to suppress error messages. I tried with grep -v also.
But it didnt help.

Do you have any solution?
  #2 (permalink)  
Old 12-29-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Just redirect stderr to /dev/null, i.e.

my_command_here 2>/dev/null

You could also redirect to a file if you want to check error output later.

Cheers
ZB
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0