rm -fr fails to remove directory due to “Is a directory” errorsudo rm -rf returns “cannot remove...
What exactly is the 'online' in OLAP and OLTP?
Do I have to explain the mechanical superiority of the player-character within the fiction of the game?
How many children?
How did Bellatrix know about the Philosopher's Stone?
Can you find x?
Has there been any indication at all that further negotiation between the UK and EU is possible?
Did the CIA blow up a Siberian pipeline in 1982?
Should developer taking test phones home or put in office?
How long would it take to cross the Channel in 1890's?
Why aren't non-isolated DC-DC converters made for high wattage applications?
How does DC work with natural 20?
What could exist inside and between the walls of a Dyson Sphere?
Count All Possible Unique Combinations of Letters in a Word
What's the difference between a deep fryer and a chip pan?
"How can you guarantee that you won't change/quit job after just couple of months?" How to respond?
How to colour a table with opaque colour such that no text and no lines are visible?
When can you leave off “le/la” to say “it” in French?
Trainee keeps missing deadlines for independent learning
Hot coffee brewing solutions for deep woods camping
How many people are necessary to maintain modern civilisation?
What is the origin of Scooby-Doo's name?
Loss of power when I remove item from the outlet
How much will studying magic in an academy cost?
When two first person POV characters meet
rm -fr fails to remove directory due to “Is a directory” error
sudo rm -rf returns “cannot remove directory” on empty directory owned by rootlstat64 fails on existing directoryRemove directory in ftpHow to delete this undeletable directory?Remove parent and sub directoryCannot (force) remove directory in Docker buildRemove a directory from inside using the command line interfaceCannot remove <file>: No such file or directoryCan not delete file due to “Invalid argument”Linux Keeps Operating after rm -rf --no-preserve-root /Remove files + files from subdirectories in Directory
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Recently noticed that one of my CentOS NFS clients have a directory which looks somewhat corrupted:
CentOS release 6.3 (Final)
[root@LG-B8A-LNX ~]# ls -lathr /
ls: cannot access /zebra: No such file or directory
total 134K
d?????????? ? ? ? ? ? zebra
Remove attempts failed:
[root@LG-B8A-LNX ~]# rm -fr /zebra
rm: cannot remove `/zebra': Is a directory
As well as lookup attemps:
[root@LG-B8A-LNX ~]# stat /zebra
stat: cannot stat `/zebra': No such file or directory
In the past this folder was used as a mount point to an NFS server
Can this directory entry be deleted in some way?
files rm corruption
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 8 more comments
Recently noticed that one of my CentOS NFS clients have a directory which looks somewhat corrupted:
CentOS release 6.3 (Final)
[root@LG-B8A-LNX ~]# ls -lathr /
ls: cannot access /zebra: No such file or directory
total 134K
d?????????? ? ? ? ? ? zebra
Remove attempts failed:
[root@LG-B8A-LNX ~]# rm -fr /zebra
rm: cannot remove `/zebra': Is a directory
As well as lookup attemps:
[root@LG-B8A-LNX ~]# stat /zebra
stat: cannot stat `/zebra': No such file or directory
In the past this folder was used as a mount point to an NFS server
Can this directory entry be deleted in some way?
files rm corruption
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
@muru Thanks, but if it safe to run it on mounted filesystem?fsck /gives me warning that /dev/sda3 is mounted
– Samuel
Mar 2 '17 at 10:19
2
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
1
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
2
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54
|
show 8 more comments
Recently noticed that one of my CentOS NFS clients have a directory which looks somewhat corrupted:
CentOS release 6.3 (Final)
[root@LG-B8A-LNX ~]# ls -lathr /
ls: cannot access /zebra: No such file or directory
total 134K
d?????????? ? ? ? ? ? zebra
Remove attempts failed:
[root@LG-B8A-LNX ~]# rm -fr /zebra
rm: cannot remove `/zebra': Is a directory
As well as lookup attemps:
[root@LG-B8A-LNX ~]# stat /zebra
stat: cannot stat `/zebra': No such file or directory
In the past this folder was used as a mount point to an NFS server
Can this directory entry be deleted in some way?
files rm corruption
Recently noticed that one of my CentOS NFS clients have a directory which looks somewhat corrupted:
CentOS release 6.3 (Final)
[root@LG-B8A-LNX ~]# ls -lathr /
ls: cannot access /zebra: No such file or directory
total 134K
d?????????? ? ? ? ? ? zebra
Remove attempts failed:
[root@LG-B8A-LNX ~]# rm -fr /zebra
rm: cannot remove `/zebra': Is a directory
As well as lookup attemps:
[root@LG-B8A-LNX ~]# stat /zebra
stat: cannot stat `/zebra': No such file or directory
In the past this folder was used as a mount point to an NFS server
Can this directory entry be deleted in some way?
files rm corruption
files rm corruption
edited Mar 2 '17 at 12:17
Rui F Ribeiro
40.5k1689150
40.5k1689150
asked Mar 2 '17 at 10:15
SamuelSamuel
13316
13316
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
@muru Thanks, but if it safe to run it on mounted filesystem?fsck /gives me warning that /dev/sda3 is mounted
– Samuel
Mar 2 '17 at 10:19
2
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
1
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
2
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54
|
show 8 more comments
3
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
@muru Thanks, but if it safe to run it on mounted filesystem?fsck /gives me warning that /dev/sda3 is mounted
– Samuel
Mar 2 '17 at 10:19
2
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
1
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
2
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54
3
3
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
@muru Thanks, but if it safe to run it on mounted filesystem?
fsck / gives me warning that /dev/sda3 is mounted– Samuel
Mar 2 '17 at 10:19
@muru Thanks, but if it safe to run it on mounted filesystem?
fsck / gives me warning that /dev/sda3 is mounted– Samuel
Mar 2 '17 at 10:19
2
2
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
1
1
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
2
2
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54
|
show 8 more comments
1 Answer
1
active
oldest
votes
Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.
Try lsof | grep /zebra to find any process that may be still using /zebra.
Also try umount -l /zebra, and rm -rf again.
1
Sorry,~]# lsof /zebra lsof: status error on /zebra: No such file or directory
– Samuel
Mar 5 '17 at 11:45
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f348617%2frm-fr-fails-to-remove-directory-due-to-is-a-directory-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.
Try lsof | grep /zebra to find any process that may be still using /zebra.
Also try umount -l /zebra, and rm -rf again.
1
Sorry,~]# lsof /zebra lsof: status error on /zebra: No such file or directory
– Samuel
Mar 5 '17 at 11:45
add a comment |
Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.
Try lsof | grep /zebra to find any process that may be still using /zebra.
Also try umount -l /zebra, and rm -rf again.
1
Sorry,~]# lsof /zebra lsof: status error on /zebra: No such file or directory
– Samuel
Mar 5 '17 at 11:45
add a comment |
Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.
Try lsof | grep /zebra to find any process that may be still using /zebra.
Also try umount -l /zebra, and rm -rf again.
Check the /etc/mtab, maybe there is a line that still points the directory to the NFS mount. Also check if you have automount service running in the server.
Try lsof | grep /zebra to find any process that may be still using /zebra.
Also try umount -l /zebra, and rm -rf again.
answered Mar 2 '17 at 12:17
Eduardo BaitelloEduardo Baitello
459518
459518
1
Sorry,~]# lsof /zebra lsof: status error on /zebra: No such file or directory
– Samuel
Mar 5 '17 at 11:45
add a comment |
1
Sorry,~]# lsof /zebra lsof: status error on /zebra: No such file or directory
– Samuel
Mar 5 '17 at 11:45
1
1
Sorry,
~]# lsof /zebra lsof: status error on /zebra: No such file or directory– Samuel
Mar 5 '17 at 11:45
Sorry,
~]# lsof /zebra lsof: status error on /zebra: No such file or directory– Samuel
Mar 5 '17 at 11:45
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f348617%2frm-fr-fails-to-remove-directory-due-to-is-a-directory-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
You'll probably need to fsck the filesystem.
– muru
Mar 2 '17 at 10:16
@muru Thanks, but if it safe to run it on mounted filesystem?
fsck /gives me warning that /dev/sda3 is mounted– Samuel
Mar 2 '17 at 10:19
2
No, not at all. You'll probably have to boot to a recovery mode, or use a live system.
– muru
Mar 2 '17 at 10:21
1
@RuiFRibeiro No, but this folder was used as a mount point to nfs server
– Samuel
Mar 2 '17 at 10:40
2
Please add that to the question.
– Rui F Ribeiro
Mar 2 '17 at 10:54