Bug 456661

Summary: i used mv command but it delete and cp command and it done nothing!!
Product: [Fedora] Fedora Reporter: erfan bonyadi <erfan_bo>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 9CC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-25 09:39:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description erfan bonyadi 2008-07-25 08:58:59 EDT
Description of problem:

Version-Release number of selected component (if applicable):fedora 9 2.6.25-14

hi there
take a look at this simple command !!

[root@localhost Tools]# mv -v i686-rh73-gcc32.tgz /Rar
mv: overwrite `/Rar'? y
`i686-rh73-gcc32.tgz' -> `/Rar'
removed `i686-rh73-gcc32.tgz'

i checked .bashrc every thing is right !! so Y my files are deleted insted of
being moved to the /Rar directory?


[root@localhost Tools]# cp INSTALL /Rar
cp: overwrite `/Rar'? y

and nothing happend!! Y?

Actual results:deleted

Expected results:move

Additional info:the same is about the cp command but it do nothing !!
Comment 1 Caolan McNamara 2008-07-25 09:13:31 EDT
mv and cp are from "coreutils" (rpm -qf `which mv`) and not mythes-sk, or
4Suite. From you messages, I'd say that "/Rar" is not a directory, but a file,
hence the "overwrite" warnings.
Comment 2 Ondrej Vasik 2008-07-25 09:39:22 EDT
As explained in comment #1 everything works as expected. In first command you
moved file i686-rh73-gcc32.tgz into file /Rar . In second command you have
copied file INSTALL to the file /Rar and you replaced that file. If you want to
move file to certain path, be sure that the destination path exists (is created
by mkdir command). I would recommend you to read some basic linux commands howto
prior to prevent another unwanted accidents. Closing NOTABUG.