[Solved] Suppress do you wish to overwrite (y or n)?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Suppress do you wish to overwrite (y or n)?
# 1  
Old 10-31-2013
[Solved] Suppress do you wish to overwrite (y or n)?

Hi all,
as i have to deal every day with .log and also .csv files,
i would like to know if there is any way to suppress "do you wish to overwrite (y or n)?" prompt with the option no for all prompts,
the command i usually run is the following,
Code:
find /opt/new-generic-spool/files/done/outarchive/*.csv -type f -mtime +1 -exec gzip {} \;

i know the option
Code:
--force

of
Code:
gzip

, but to do that it will be neccesary to first list all files and then use
Code:
sed

what i wanted to is to implement the option suppress no on the promts.

Last edited by charli1; 10-31-2013 at 09:31 AM.. Reason: Moved thread; not an "expert" issue
# 2  
Old 10-31-2013
That's not the correct usage for find.

The path and the filename should be separated (find <path> -name <filespec>).

In any case, try:
Code:
false | find ... -exec gzip -q {} \;


Last edited by Scott; 10-31-2013 at 09:30 AM.. Reason: Misread originally; reposted
# 3  
Old 10-31-2013
Quote:
Originally Posted by Scott
That's not the correct usage for find.

The path and the filename should be separated (find <path> -name <filespec>).

In any case, try:
Code:
false | find ... -exec gzip -q {} \;

thanks
SOLVED.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

suppress RCS messages

ci filename This command displays a message. I don't want it to. How can I keep RCS from doing so? (5 Replies)
Discussion started by: robin_simple
5 Replies

2. Programming

[Solved] Append instead of overwrite

Hi, I have a script which append the .csv file which already exist but in my scenarion every time instead of appending the contect it overwrite the file and creating new .csv file. SET ORAUSR=ops$371664 SET ORAPWD=Oracle12345 SET ORADB=orcl SET DBCON=%ORAUSR%/%ORAPWD%@%ORADB% sqlplus... (1 Reply)
Discussion started by: tushar_spatil
1 Replies

3. Shell Programming and Scripting

Suppress the output of ping

Hi All, I just wanted to know, is there a way to suppress the output of the following i.e. the output should not be written on the screen: ping 10.1.23.234 -n 1 PING 10.1.23.234: 64 byte packets 64 bytes from 10.1.23.234: icmp_seq=0. time=0. ms ----10.1.23.234 PING Statistics---- 1... (2 Replies)
Discussion started by: ss_ss
2 Replies

4. Shell Programming and Scripting

how to suppress dd output?

I have to stop the output of dd from writing to terminal. Here is the command: sudo dd if=boot1h of="/dev/r$temp1" Here is the output: 2+0 records in 2+0 records out 1024 bytes transferred in 0.000804 secs (1273715 bytes/sec) I have tried >> log.txt but it doesn't work. Is there... (4 Replies)
Discussion started by: msf5042
4 Replies

5. Shell Programming and Scripting

suppress the Connection text

Hi Guys, I am calling a function from my script. The function has to return only one value which is the year. But in the function, i am having connecting statement to the database. The connection information is coming along with the year variable. I want to suppress the connecting... (1 Reply)
Discussion started by: mac4rfree
1 Replies

6. Shell Programming and Scripting

suppress unzip queries

hey i have piece of code working in solaris and same code i want to deploy it in linux but in solaris its not asking for queris but in linux it is !!!! COMMAND ==> unzip $test/alter.war -d $webclientHome/. OUTPUT==> In solaris it proceeds with following traces replace /aa/test.txt?... (4 Replies)
Discussion started by: crackthehit007
4 Replies

7. Shell Programming and Scripting

Suppress awk warnings

Hello everyone, Sorry if this is a bit of an RTM thing, but I can't find any flags for suppressing warnings with awk and Googling (this site too) didn't yield much useful. Does anyone know how to suppress warnings? The warning I'm specifically trying to remove is one warning me that I'm... (1 Reply)
Discussion started by: kdelok
1 Replies
Login or Register to Ask a Question