[SOLVED] Canīt remove directory with rm -rf [Directory not empty]
Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Use ls -a and you should find that there are some hidden files and/or directories in there.
Code:
[core-ssh 28]$ ls -a
[core-ssh 28]$
rknichols
Quote:
1. "ls" is invoking something other that the standard "ls" utility. The command "type ls" might reveal something.
Code:
[core-ssh 28]$ type ls
ls is hashed (/bin/ls)
rknichols
Quote:
2. This might be a situation in need of "fsck" on the filesystem.
How do I use fsack?
Code:
[core-ssh 28]$ fsck
fsck (busybox 1.36.1)
[core-ssh 28]$ fsck --help
BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary.
Usage: fsck [-ANPRTV] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]...
Check and repair filesystems
-A Walk /etc/fstab and check all filesystems
-N Don't execute, just show what would be done
-P With -A, check filesystems in parallel
-R With -A, skip the root filesystem
-T Don't show title on startup
-V Verbose
-t TYPE List of filesystem types to check
[core-ssh 01]$ mount
overlay on / type overlay (rw,relatime,lowerdir=/mnt/data/docker/overlay2/l/Z2OB6PEKK2YZBD4PMO4MVPGD65:/mnt/data/docker/overlay2/l/UQQAFIMQXTQSN6UDT76EVSGTF2:/mnt/data/docker/overlay2/l/CZ2WL4T4SEKON5YPCGIEDUYHDZ:/mnt/data/docker/overlay2/l/652IOPQEMPDHZMHDO73GTWPNR2:/mnt/data/docker/overlay2/l/ZKLAA3CMRMDOQ7RTVYQWZRDN5U:/mnt/data/docker/overlay2/l/XGHY4JRCADB2NAF2KYFTMHMAMY:/mnt/data/docker/overlay2/l/S77H54AJ74DY4C7IBKIT75DM2H:/mnt/data/docker/overlay2/l/BZSJMRGZF3M2NUIHGGB7WZHWLT:/mnt/data/docker/overlay2/l/4JADSAWCSQMXQXVIZB2TOGYMJE:/mnt/data/docker/overlay2/l/3MGXKMKIJI6635A4NKDZ4A76WA,upperdir=/mnt/data/docker/overlay2/c50cd23f38a30112ddce8248fb0aaf38596dc841c26e546f81255d0c0cd8bbec/diff,workdir=/mnt/data/docker/overlay2/c50cd23f38a30112ddce8248fb0aaf38596dc841c26e546f81255d0c0cd8bbec/work)proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup type cgroup2 (ro,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
/dev/sda8 on /homeassistant type ext4 (rw,relatime,commit=30)
/dev/sda8 on /data type ext4 (rw,relatime,commit=30)
devtmpfs on /dev type devtmpfs (ro,relatime,size=3030572k,nr_inodes=757643,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/sda8 on /backup type ext4 (rw,relatime,commit=30)/dev/sda8 on /media type ext4 (rw,relatime,commit=30)/dev/sda8 on /addon_configs type ext4 (rw,relatime,commit=30)/dev/sda8 on /ssl type ext4 (rw,relatime,commit=30)/dev/sda8 on /share type ext4 (rw,relatime,commit=30)/dev/sda8 on /addons type ext4 (rw,relatime,commit=30)
/dev/sda8 on /run/audio type ext4 (ro,relatime,commit=30)
/dev/sda8 on /etc/asound.conf type ext4 (ro,relatime,commit=30)
tmpfs on /run/dbus type tmpfs (ro,size=1213056k,nr_inodes=819200,mode=755)
/dev/sda8 on /etc/resolv.conf type ext4 (rw,relatime,commit=30)
/dev/sda8 on /etc/hostname type ext4 (rw,relatime,commit=30)
/dev/sda8 on /etc/hosts type ext4 (rw,relatime,commit=30)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda8 on /etc/pulse/client.conf type ext4 (ro,relatime,commit=30)
proc on /proc/bus type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/fs type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/irq type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
tmpfs on /proc/asound type tmpfs (ro,relatime)
tmpfs on /proc/acpi type tmpfs (ro,relatime)
devtmpfs on /proc/kcore type devtmpfs (ro,relatime,size=3030572k,nr_inodes=757643,mode=755)
devtmpfs on /proc/keys type devtmpfs (ro,relatime,size=3030572k,nr_inodes=757643,mode=755)
devtmpfs on /proc/timer_list type devtmpfs (ro,relatime,size=3030572k,nr_inodes=757643,mode=755)
tmpfs on /proc/scsi type tmpfs (ro,relatime)
tmpfs on /sys/firmware type tmpfs (ro,relatime)
Is this on a local computer? Which Linux distribution are you using? This is always useful information to post in a new thread as there are probably over 1,000 different Linux distributions.
Where in the directory tree is this directory located?
Do you get the same error message when you try to remove it when logged in as root?
I don't know why you get the error you do as I would expect a 'permission denied' since the directory owner:group are clearly root:root and you are logged in as a user.
I noticed 'overlay' in the output of your mount command so might I suggest that you take a look at the link below to familiarize yourself.
digs up a lot of dirt, including kernel driver issues. As such I am not so sure this is a "Linux - Newbie" question. You might get more traction over at "Linux - Containers".
thank you for your commitment.
the problem is solved!!
After a total shutdown of the server, the problem disappeared.
Previously tried just reboting, but that didn't help.
The Linux "distro" is -> Home Assistant Operating System.
runnin in VirtualBox.
I'm glad to see you got your problem solved and would suggest that in the future, posting here or any other forum you provide more information at the start to get help. In addition to answers to the questions I asked in my earlier post, it would have been quite helpful to indicate you were using virtualization software and particularly which 'Linux' you are using, particularly when it is something as obscure as your "home assisteant". Is the link below to the software you are using? If so, posting the link would have been helpful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.