Jump to content

Overwrite?


WilliamS
 Share

Recommended Posts

Truly newby question:

A fix for mdk 9.1 says do # cp /etc/pam.d/xscreensaver /etc/pam.d/kscreensaver3

as root. So I did that, but then konsole asks something like: Do you really want to overwrite? and I don't know what to type in.

What is the secret answer? (Not in my linux books)

 

WilliamS :?:

Link to comment
Share on other sites

"yes" was the first thing I tried, however ls /etc/pam.d/ showed that the xscreensaver was not overwritten, is still there.

 

IAs this the way it is supposed to work?

I'd have thought that overwritten meant overwritten.

:roll:

Link to comment
Share on other sites

y will also work:)

 

if you don't want the question you can add the option -f (of force)..the question won't be asked then. If you want to delete directories you can add -R (of recursive)...everything in teh directorie and in teh subdirectories of the directory will be deleted.

 

so..

 

rm -f <files>

 

(recursive)

 

rm -R <dir>

 

you can also use the flags together(certaiunlt handy fro complete directories:))

Link to comment
Share on other sites

"yes" was the first thing I tried, however ls /etc/pam.d/ showed that the xscreensaver was not overwritten, is still there.

 

IAs this the way it is supposed to work?

I'd have thought that overwritten meant overwritten.

:roll:

 

cp is copy..so teh original file will be there after the copy....

the desitnation file probably existed already and that is the one that is oevrwritten...but also that name still exists ofcourse.

Link to comment
Share on other sites

cp /random/path1/file1.txt /random/path2/file2.txt

 

This command will copy file1.txt to file2.txt. This means that afterwards there will still be a file1.txt and a file2.txt, BUT they will both have the same contents. The command will not delete any files just over write file2 with the CONTENTS of file1.

Link to comment
Share on other sites

"yes" was the first thing I tried, however ls /etc/pam.d/ showed that the xscreensaver was not overwritten, is still there.

 

IAs this the way it is supposed to work?

I'd have thought that overwritten meant overwritten.

:roll:

 

Your command

 

cp /etc/pam.d/xscreensaver /etc/pam.d/kscreensaver3

 

means, copy xscreensaver to overwrite kscreensaver3. xscreensaver is the source and kscreensaver3 is the destination. Therefore, xscreensaver is not going to be altered. kscreensaver will be replaced.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...