Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-09-2002, 05:05 PM   #1
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
Question Auto-confirm overwrite questions?

On my YDL2.1 server, whenever I am in through ssh and su'd in... when I do cp actions from one dir to another dir, it never asks me for confirmation.

However my new RH7.3 server does. Drives me insane, because I like to do batch copy/paste of cp commands (which I have written in a text file on my machine). However with the confirmation in between, it kills the rest of the paste, waiting for me to type a "y".

Where can I turn this off? Thanks in advance for any answers.
Old 06-09-2002, 05:46 PM   #2
Senior Member
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
Use the -f flag for force (I think). Anywayz, man cp should help you, and you probably have a alias made in some of your configuration files that make cp ask to confirmation every time. Check .bashrc or .profile and make sure theres no alias cp cp -something line in those files...
Hope that helps
Old 06-09-2002, 06:09 PM   #3
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Original Poster
Rep: Reputation: 15
Found the little buggers

Found a .bashrc file in the /root directory that had the evil aliases for a whole bunch of commands setting them all to ASK for confirmations. Non existed in my actual user I was logging in with and su'ing with... but the root user had them.

Ok, thanks! Works now when I commented those out via vi.
Old 06-10-2002, 07:32 AM   #4
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
It may not be useful in your case, but sometimes you can confirm programs that read your input with a pipe:

echo y | myprogram


Old 06-10-2002, 07:40 AM   #5
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
well a more complete solution is to just plain use "yes"

yes | my program

btw. yes is also a superb program for flooding chatrooms. not that i'd know of course


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
confirm client on network justwantin Slackware 2 11-13-2004 05:29 PM
please confirm NAT question. musicman_ace Linux - Networking 3 06-02-2004 03:43 AM
Please confirm backup routine LLS Linux - General 4 09-30-2003 12:30 PM
DNS idea (please confirm) prism ra Linux - Networking 2 10-07-2002 02:52 PM
A few quick questions about modems and auto mounting a hd justiceisblind Linux - Newbie 1 04-13-2002 09:45 PM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration