public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: Maxim Blinov <maxim.blinov@embecosm.com>,
	linux-ext4@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Help! How to delete an 8094-byte PATH?
Date: Thu, 27 Jan 2022 13:40:44 +0000	[thread overview]
Message-ID: <YfKg3DQS0h2lPo3z@casper.infradead.org> (raw)
In-Reply-To: <20220127122039.45kxmnm3s7kflo6h@riteshh-domain>

On Thu, Jan 27, 2022 at 05:50:39PM +0530, Ritesh Harjani wrote:
> On 22/01/27 07:06AM, Maxim Blinov wrote:
> > $ for i in $(seq 999999); do echo "im $i levels deep"; cd confdir3; done;
> >
> > It then ran for a while, and eventually I got to the bottom:
> >
> > ```
> > ...
> > im 892 levels deep
> > im 893 levels deep
> > im 894 levels deep
> > im 895 levels deep
> > im 896 levels deep
> > bash: cd: confdir3: File name too long
> > $ ls
> > <nothing here>
> > ```
> >
> > So then, I `cd ../`, and `rmdir confdir3`, but even here, I get
> >
> > rmdir: failed to remove 'confdir3/': File name too long
> >
> > I would be very grateful if someone could please help suggest how I
> > might get this infernal tower of directories off of my precious ext4
> > partition.
> >
> > I was thinking maybe there's some kind of magic "forget this directory
> > inode ever existed" command, but I am out of my depth with filesystems.

here's an idea:

while true; do
	mv confdir3/confdir3 tmpd; rmdir confdir3; mv tmpd confdir3;
done

  reply	other threads:[~2022-01-27 13:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  7:06 Help! How to delete an 8094-byte PATH? Maxim Blinov
2022-01-27  7:27 ` Maxim Blinov
2022-01-27 12:20 ` Ritesh Harjani
2022-01-27 13:40   ` Matthew Wilcox [this message]
2022-01-27 15:09     ` Maxim Blinov
2022-01-27 15:34       ` Maxim Blinov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfKg3DQS0h2lPo3z@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=maxim.blinov@embecosm.com \
    --cc=riteshh@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox