Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
08-25-2015, 01:25 PM
|
#31
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
Isn't bleachbit "fun"?
|
|
|
08-25-2015, 01:49 PM
|
#32
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
[QUOTE=ramsforums;5410897]
Quote:
Originally Posted by goumba
In addition, sudo doesn't work too well with redirecting and pipes. You need to run that command by using su or sudo bash.
Code:
su -c "nohup /usr/bin/rm -rf <directorypath> >/tmp/nohup.out 2>&1 </dev/null"
Thanks.
If I run on entire directory it may take several hours.
I tried as follows
.. snip... Then executed command as per your suggestion. But the directory is not getting removed.
|
I copied and pasted a previous poster's response without checking. The command as posted silently fails. D'oh! Try it again, removing /usr (rm is in /bin on my system). Or, even still,
Code:
su -c "nohup $(which rm) -rf <directorypath> >/tmp/nohup.out 2>&1 </dev/null"
$(which rm) will substitute the correct location on your system
|
|
|
08-25-2015, 02:07 PM
|
#33
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,804
|
Quote:
Originally Posted by jpollard
There are a few. XFS can have "billions"... (it dynamically adds inodes as needed).
In this case, I think it is referring to "more than I can count".
There is a limit to how many links to a file can exist (I don't remember if it is a 16 bit field or a 32 bit field).
|
For ext4 there is a 65000 link limit, but I don't know whether that's due to the filesystem or a kernel limit for all filesystems.
The top level directory size is about 1 gigabyte, so there can't be "billions" of entries there, but there's been no indication of how deep the tree goes.
Last edited by rknichols; 08-25-2015 at 02:09 PM.
|
|
|
08-25-2015, 02:21 PM
|
#34
|
Member
Registered: Jun 2007
Posts: 66
Original Poster
Rep:
|
I am not exactly sure billions or millions of directory.
I got the following message for selectively removing folders.
Quote:
rama@develop ~/T6o1L9lGg- $
rama@develop ~/T6o1L9lGg- $ su -c "rm -vfR a*"
Password:
bash: /bin/rm: Argument list too long
|
|
|
|
08-25-2015, 02:25 PM
|
#35
|
Member
Registered: Jun 2007
Posts: 66
Original Poster
Rep:
|
[QUOTE=goumba;5410978]
Quote:
Originally Posted by ramsforums
I copied and pasted a previous poster's response without checking. The command as posted silently fails. D'oh! Try it again, removing /usr (rm is in /bin on my system). Or, even still,
Code:
su -c "nohup $(which rm) -rf <directorypath> >/tmp/nohup.out 2>&1 </dev/null"
$(which rm) will substitute the correct location on your system
|
Thanks. I have tried as per your suggestion. This too silently failed
Quote:
rama@develop ~ $ su -c "nohup $(which rm) -rvf ~/T6o1L9lGg-/ >/tmp/nohup.out 2>&1 </dev/null"
Password:
rama@develop ~ $ ls
apps Desktop md.log mydelexe.c T6o1L9lGg- Videos
backup Documents Music ocd tempdir xCopy
Copy Downloads mydel.c Pictures Templates
delempty empty mydelexe Public test1
rama@develop ~ $
|
|
|
|
08-25-2015, 02:37 PM
|
#36
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by ramsforums
Thanks. I have tried as per your suggestion. This too silently failed
|
Odd, it worked for me, tested it on several directories.
If that gives you nothing, there's the problem. Try /bin/rm in it's place.
Last edited by goumba; 08-25-2015 at 02:41 PM.
Reason: Fixed broken markup
|
|
|
08-25-2015, 02:44 PM
|
#37
|
Member
Registered: Jun 2007
Posts: 66
Original Poster
Rep:
|
Quote:
Originally Posted by goumba
Odd, it worked for me, tested it on several directories.
If that gives you nothing, there's the problem. Try /bin/rm in it's place.
|
Thanks. I got as follows
Quote:
rama@develop ~ $ which -a rm
/bin/rm
|
Now I am executing the following command with su -c option. will update this thread when command completes. in progress now..
Quote:
rama@develop ~ $ su -c "rsync -av --delete ./emptydir/ ./T6o1L9lGg-/"
Password:
sending incremental file list
|
Last edited by ramsforums; 08-25-2015 at 02:47 PM.
|
|
|
08-26-2015, 12:02 AM
|
#38
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,804
|
FWIW, I loaded a directory with ~5,600,000 entries (@ 10,000 links per inode). It took much of the day to fill it, and "rm -r" took 50 minutes to clean it out. This was on an ext4 filesystem on a not terribly fast 320GB disk and with a 1.6GHz AMD CPU.
|
|
|
08-26-2015, 06:02 PM
|
#39
|
Member
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Rep:
|
What about xfs and btrfs and zfs. Are the directory entries in these file systems indexed?
|
|
|
08-26-2015, 06:24 PM
|
#40
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
Quote:
Originally Posted by Lsatenstein
What about xfs and btrfs and zfs. Are the directory entries in these file systems indexed?
|
btrfs uses two methods: btree (good for directory manipulations), and hash (for fast lookups).
I believe xfs uses b+tree.
I don't know about zfs - but I did find reports of poor directory performance with 4000+ files.
|
|
|
08-26-2015, 06:45 PM
|
#41
|
Member
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Rep:
|
Hi JP
Are there any filesystems that use a b+ tree. For a while I thought that btrfs was based on the b+, but I guess I am wrong.
In my old IBM days we used VSAM. (Very successful access method). We joked that it was a ("very special access method).
VSAM was essentially a b+ tree organization, used with spinning disks that provided rotational positional sensing. One dedicated track told the disk controller the realtime angle of the disk. The theory and practice at that time being that the driver would choose the buffer for the sector that was just ahead of the disk head. The software did not have to wait for the disk index marker to be detected before beginning to search to write a buffer.
VSAM brought back memories of control areas, control invervals, free space within each, and also small sized data blocks stored along with the index.
|
|
|
08-26-2015, 07:34 PM
|
#42
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
All of that location handling is done in the disk now. The drive itself has the buffer for the given address.
|
|
|
All times are GMT -5. The time now is 05:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|