shell redirection in find


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users shell redirection in find
# 1  
Old 06-09-2008
shell redirection in find

hi,
i need to clear data off a DOA backup drive.
i try this, but just get a file {} in . and no change on the backup drive.
bash shell
find /mnt/usbbackup -xdev -type f -exec echo `date` > {} \;

any ideas? thanks. Smilie
# 2  
Old 06-09-2008
Just used shred

ok. learned about shred and it is fixed.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Redirection? (I do find some of the strangest things.)

(Apologies for any typos.) Can someone help me with this one please. I am writing a snippet that will come on here soon to work on OSX, Linux and CygWin but I hit this! I hope this is lucid enough because I really do not understand what is going on. Take these few lines:- #!/bin/sh # OR... (6 Replies)
Discussion started by: wisecracker
6 Replies

2. Shell Programming and Scripting

Several exec on find send all the output to the last redirection

Example script: find mydir -type f -exec echo {}>aaa \; -exec echo {}>bbb \;The two paths go the the bbb file, while there should be one of them on each file. How should I do it to get it working? (2 Replies)
Discussion started by: Tribe
2 Replies

3. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies

4. Shell Programming and Scripting

How to find out the shell of the shell script?

Hello My question is: How to find out the shell of the shell script which we are running? I am writing a script, say f1.sh, as below: #!/bin/ksh echo "Sample script" From the first line, we can say this script will run in ksh. But, how can we prove it? Can we print anything inside... (6 Replies)
Discussion started by: guruprasadpr
6 Replies

5. Shell Programming and Scripting

Shell script output redirection question

OS : AIX 6.1 Shell : Korn in the url https://forums.oracle.com/forums/thread.jspa?threadID=361463&tstart=0 I came across a crontab entry example 00 23 * * 1,3,5 <complete shell script path> 1> <log file> 2>&1 From googling , I gathered that 0 - stdin 1 - stdout 2 - stderr I... (5 Replies)
Discussion started by: polavan
5 Replies

6. Shell Programming and Scripting

Shell redirection doubt

Hi, Could anyone explain me why I am getting the 'broken pipe' error for the below? exec 3>&1 echo cat | cat <&3 -su: echo: write error: Broken pipe (2 Replies)
Discussion started by: royalibrahim
2 Replies

7. Shell Programming and Scripting

Help with Output Redirection of a Unix Shell Script

Hi Guys, I have a script for which the stdout and stderr should be redirected to a log file, they should not be printed on the screen. Could you please let me know the procedure to redirect the output of the script to a log file. Thanks in advance. --- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies

8. Shell Programming and Scripting

Unix shell output redirection help

Hi all, Actually i need to know whether there is any way to redirect the output of shell operations into any file without pipe . Actually my problem is , i run some command & its result is displayed on shell after some calculations on shell, so if i redirect its output to file, it is not... (5 Replies)
Discussion started by: sarbjit
5 Replies

9. Shell Programming and Scripting

Asking about shell script input output redirection

Hi, Can anyone please tell me what these lines do? ls >& outfile ls outfile 2>&1 Thanks. (1 Reply)
Discussion started by: trivektor
1 Replies

10. Shell Programming and Scripting

Miniature Shell - IO Redirection and Pipe line filters

hi, I was trying to write a miniature shell (ie, command line interpreter) to implement the features like 'IO Redirection' and 'Pipe line fileters'. Can anyone help me with sample shell sript to implement the above features. cheers supong (2 Replies)
Discussion started by: supong
2 Replies
Login or Register to Ask a Question