Bug 8177 - rm command can't delete file, unless using the full path for the rm binary "/bin/rm"
Summary: rm command can't delete file, unless using the full path for the rm binary "/...
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 00:42 CET by John Connor
Modified: 2012-11-23 03:05 CET (History)
1 user (show)

See Also:
Source RPM: coreutils-8.15-1.1.mga2.src.rpm
CVE:
Status comment:


Attachments

Description John Connor 2012-11-22 00:42:36 CET
Description of problem:
In the terminal when I use the rm command to delete a text file that I created, for example "myfile", the rm command shows a message, I press the ENTER key but the ls command shows me that "myfile" still exist but if I instead use the full path for the rm binary "/bin/rm" to delete "myfile", the ls command shows me that "myfile" was deleted.

Version-Release number of selected component (if applicable):
coreutils-8.15-1.1.mga2


Let me show you this example:

1. Use ls command to show "myfile"

$ ls

    myfile

2. Use the rm command to delete "myfile"

$ rm myfile
rm: remove regular file `myfile'?

3. Use ls command and "myfile" still exist. 
 
$ ls

    myfile

4. Use /bin/rm to delete "myfile"

$ /bin/rm myfile

5. The ls command shows "myfile" was deleted

$ ls
Comment 1 Thomas Backlund 2012-11-22 12:19:42 CET
That is intended.

rm is aliased to "rm -i" to ask the question as a safety feature, so you must answer the question, not only press enter.

$ touch testfile
$ ll testfile
-rw-rw-r-- 1 tmb tmb 0 Nov 22 13:14 testfile
$ rm  testfile
rm: remove regular empty file `testfile'? y
$ ll testfile
ls: cannot access testfile: No such file or directory


the other way to avoid the question is to do "rm -f"

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => INVALID

Comment 2 John Connor 2012-11-23 03:05:54 CET
I understood; thank you for your answer.

Note You need to log in before you can comment on or make changes to this bug.