AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  Deleting A Directory Named ../

    Posted Thu November 18, 2010 04:19 PM

    Originally posted by: donalson


    We had a user who accidentally created a directory named /home/username/tools/../

    We've tried everything we can think of to delete it. We are using JFS2 and AIX 6.1.

    Any ideas? Thanks.
    #AIX-Forum


  • 2.  Re: Deleting A Directory Named ../

    Posted Thu November 18, 2010 06:41 PM

    Originally posted by: DjRobin69


    Carefully! cd to the direct, backup all and do a rm -ir * - should prompt you first and pick up everything in the directory
    #AIX-Forum


  • 3.  Re: Deleting A Directory Named ../

    Posted Thu November 18, 2010 11:24 PM

    Originally posted by: j.gann


    i suspect it's hard to create this directory in the first place. possibly it has some non-printable characters around the "..".
    suggested method is "ls -li" (shows inode numbers in first column)
    and "find . -inum <inode number of dir to delete> -exec <your favourite rmdir rm -r or whatever cmd> \;"
    #AIX-Forum


  • 4.  Re: Deleting A Directory Named ../

    Posted Thu November 18, 2010 11:27 PM

    Originally posted by: j.gann


    just to make it complete:
    "find . -inum <inode number of dir to delete> -exec <your favourite rmdir rm -r or whatever cmd> {} \;"
    #AIX-Forum


  • 5.  Re: Deleting A Directory Named ../

    Posted Fri November 19, 2010 07:59 AM

    Originally posted by: flodstrom


    Using various gui/menu tools, such as dtfile or mc (Midnight Commander), can be surprisingly effective in dealing with odd characters in file/directory names.

    Note that you need X for dtfile. Also, mc is not standard AIX, you can find it as an rpm though.
    #AIX-Forum