find cannot be redirected to specific stdout ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers find cannot be redirected to specific stdout ?
# 1  
Old 09-29-2006
find cannot be redirected to specific stdout ?

I tried to redirect the find command to a file (using find ..... > asdf ) and the file asdf is always empty . The results keep appearing on the screen.

Is there another way to do this ?

hmm . i just figured out that the file is empty only when in fact all results of the find command give a permission denied output . the file has results in any other case -

case closed . Smilie

Last edited by Shady_Creeper; 09-29-2006 at 11:39 AM..
# 2  
Old 09-29-2006
Just an FYI:

"> asdf", or "1>asdf" redirects find's stdout (normal processing messages). "2>asdf" would redirect find's stderr (error messages). If you'd like BOTH to go to the same file,

find ... 1>asdf 2>&1
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Message redirected from syslog

Hi. recently in many of our lpars we are getting a message in errpt as "C6ACA566 0315094014 U S dtc MESSAGE REDIRECTED FROM SYSLOG". I have also checked the /etc/syslog.conf file. It doesn't point to error log. Can someone please advise about how to fix this error ? pmut3:/> errpt -aj... (4 Replies)
Discussion started by: newtoaixos
4 Replies

2. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

3. Shell Programming and Scripting

Can't figure out how to find specific characters in specific columns

I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes. Is there a search for that? I tried cut but couldn't get it to work. Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Discussion started by: Drenhead
12 Replies

4. Shell Programming and Scripting

Want to find the stdout for the partiuclar user login for past 12 hrs.

Want to find the stdout for the partiuclar user login for past 12 hrs. Say for eg : user login id is teladm And the host name is sys22prod I want to see the stdout for that user id in that host for past 12 hrs (1 Reply)
Discussion started by: mail2sant
1 Replies

5. Shell Programming and Scripting

Find and replace a string a specific value in specific location in AIX

Hi, I have following samp.txt file in unix. samp.txt 01Roy2D3M000000 02Rad2D3M222222 . . . . 10Mik0A2M343443 Desired Output 01Roy2A3M000000 02Rad2A3M222222 . . (5 Replies)
Discussion started by: techmoris
5 Replies

6. Solaris

Error messgaes can not be redirected

# whoami 2>/dev/null whoami: not found # Why the error message not getting redirected to /dev/null ... The shell is # echo $SHELL /sbin/sh For other commands it is working # ls aaa 2>/dev/null # Is there any other way to redirect the err msg from whoami Thank you for your... (7 Replies)
Discussion started by: Anu_1
7 Replies

7. Solaris

stdout redirected?

Hi all, I have a c++ program which is running fine but has some printfs which its spews on to the screen, which I need for debugging. But, I execute this program through a java, i.e I run a java program which actually launches my c++ executable and when it does this, I see none of my printfs... (1 Reply)
Discussion started by: Naanu
1 Replies

8. Shell Programming and Scripting

redirected output

Hello Everyone, I have an option for users in my shell script to create log file. So if user saying “yes” on it, I'm redirecting all output to log file by doing this: > /output.log. However I would like the output being displayed on the screen at the same time. Is it possible? If yes, does anybody... (2 Replies)
Discussion started by: slavam
2 Replies

9. UNIX for Dummies Questions & Answers

Saving a redirected file

What command do I use in order to save a file in directory A/B/C to directory A/D/E. (1 Reply)
Discussion started by: JSP
1 Replies
Login or Register to Ask a Question