• CLI Linux help, directories and rm -r..

    From paulie420@1337:3/129 to All on Wed Dec 1 14:12:07 2021
    OK; I got into a small pickle. I set a new file area, in Mystic, to '~/files/userromadds'. For some reason, what Mystic did in this situation is add a sub-directory in my ~/mystic (main bbs) directory named '~'. Inside of that /home/pi/mystic/'~' directory was the /files/userromadds folder, and it contained all the files I had added to that file area...

    Ok, first things first; I went in and changes the file area to the correct /home/pi/files/userromadds, and moved THAT /userromadds sib-directory on over to my /home/pi/files where it should have been the whole time... OK.

    Well, now I want to erase that '~' directory from my ~/mystic folder. You can see the issue... if I just navigatge to ~/mystic and type:

    rm -r ~ , poof goes my system. I think if I type:

    rm -r '~' , poof goes my system.

    The following is copied right from my terminal:

    pi@bbs:~ $ cd '/home/pi/mystic/~'
    pi@bbs:~/mystic/~ $ pwd
    /home/pi/mystic/~
    pi@bbs:~/mystic/~ $

    So, I *think* a safe command to enter is:

    rm -r '/home/pi/mystic/~'

    The result that I want is to simply delete the /home/pi/mystic/'~' folder. (It shows up in quotes like that, the following is a snippet just for more info:

    pi@bbs:~/mystic $ ls -all
    total 6548
    drwxr-xr-x 35 pi pi 4096 Nov 4 04:08 .
    drwxr-xr-x 45 pi pi 4096 Dec 1 13:58 ..
    drwxr-xr-x 2 pi pi 4096 Dec 1 13:55 '~'
    -rwxr-xr-x 1 pi pi 26066 Jan 1 2021 ad_test.ini
    -rwxr-xr-x 1 pi pi 4156 Oct 17 17:02 advert.ini
    -rw-r--r-- 1 pi pi 7984 Aug 5 2020 ans2mbbs.exe
    drwxr-xr-x 5 pi pi 4096 Apr 22 2021 ansi
    (cut)

    ----------
    Anyway, sorry for the long post - but can anyone help me out? I found this while doing a backup, and having my tar end up trying to backup my ENTIRE drive

















































































































































































































































































































































































































































































































































































































    because of the ~/ naming BS... so I need to both delete that directory in my Mystic directory and my mystic backup directory... ANYWAY, all boils down to:

    rm -r '/home/pi/mystic/~'

    Is that the correct syntax to ONLY erase /home/pi/mystic/~ and NOT ~/?

    Thanks rockstars.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/10/25 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From deon@1337:2/101 to paulie420 on Thu Dec 2 14:07:13 2021
    Re: CLI Linux help, directories and rm -r..
    By: paulie420 to All on Wed Dec 01 2021 02:12 pm

    Hey Paulie,

    OK; I got into a small pickle. I set a new file area, in Mystic, to
    '~/files/userromadds'. For some reason, what Mystic did in this situation is add a sub-directory in my ~/mystic (main bbs) directory named '~'. Inside of that /home/pi/mystic/'~'
    rm -r ~ , poof goes my system. I think if I type:
    rm -r '~' , poof goes my system.

    OK, I would do this (avoid rm -r).

    You should be able to change into that directory with cd \~ (when you are in it's parent).

    ls -al (make sure its empty, and do what you need to do to make it empty.)

    "cd" to the parent
    rmdir \~ (if it fails it wont below up your home directory :)




    ...ëîåï
    --- SBBSecho 3.14-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (1337:2/101)
  • From MeaTLoTioN@1337:1/101 to deon on Thu Dec 2 09:27:25 2021
    On 02 Dec 2021, deon said the following...

    Re: CLI Linux help, directories and rm -r..
    By: paulie420 to All on Wed Dec 01 2021 02:12 pm

    Hey Paulie,

    OK; I got into a small pickle. I set a new file area, in Mystic, to '~/files/userromadds'. For some reason, what Mystic did in this situati add a sub-directory in my ~/mystic (main bbs) directory named '~'. Insi that /home/pi/mystic/'~'
    rm -r ~ , poof goes my system. I think if I type:
    rm -r '~' , poof goes my system.

    OK, I would do this (avoid rm -r).

    You should be able to change into that directory with cd \~ (when you
    are in it's parent).

    ls -al (make sure its empty, and do what you need to do to make it
    empty.)

    "cd" to the parent
    rmdir \~ (if it fails it wont below up your home directory :)

    Yes, what he said above.
    Remember that ~ is a reserved alias for home, but if you managed to make a folder with that char, you would need to escape it, like you would for other special chars, like - for example.

    The other way you could do it, seeing as you have a desktop environment on that

















































































































































































































































































































































































































































































































































































































    pi (right?) is just run nautilus to the parent directory and then just select and delete that folder as you would in the file manager for any other directory, if that makes it feel safer.

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N

    |07ÄÄ |08[|10eml|08] |15ml@erb.pw |07ÄÄ |08[|10web|08] |15www.erb.pw |07ÄÄÄ¿ |07ÄÄ |08[|09fsx|08] |1521:1/158 |07ÄÄ |08[|11tqw|08] |151337:1/101 |07ÂÄÄÙ |07ÄÄ |08[|12rtn|08] |1580:774/81 |07ÄÂ |08[|14fdn|08] |152:250/5 |07ÄÄÄÙ
    |07ÄÄ |08[|10ark|08] |1510:104/2 |07ÄÙ

    ... Inside every cynical person, there is a disappointed idealist.

    --- Mystic BBS v1.12 A47 2021/08/10 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From 0zZ-U@1337:3/106 to paulie420 on Thu Dec 2 12:27:19 2021
    I know this is not a "strictly" command line answer,
    but you could install mc (midnight commander).
    mc is an awesome terminal dual pane file manager, that you can also use
    to transfer files over sftp. It also makes making symlinks a breeze.


    .:[ Exit stage left ]:.

    --- Mystic BBS v1.12 A45 2020/02/18 (Linux/64)
    * Origin: The Bottomless Abyss BBS * bbs.bottomlessabyss.net (1337:3/106)
  • From paulie420@1337:3/129 to deon on Thu Dec 2 17:32:06 2021
    OK, I would do this (avoid rm -r).

    You should be able to change into that directory with cd \~ (when you are in it's parent).

    ls -al (make sure its empty, and do what you need to do to make it empty.)

    "cd" to the parent
    rmdir \~ (if it fails it wont below up your home directory :)

    Yes, what he said above.
    Remember that ~ is a reserved alias for home, but if you managed to make
    a folder with that char, you would need to escape it, like you would for other special chars, like - for example.

    The other way you could do it, seeing as you have a desktop environment
    on that pi (right?) is just run nautilus to the parent directory and
    then just select and delete that folder as you would in the file manager for any other directory, if that makes it feel safer.

    Thanks, my Linux friends who know more than me. :P Listen, while I'm not the best in bash, I *know* this issue would give some other MORE-green sysOps issue... :P

    OK; first, mL- I don't have a DE on my BBS box, so thats out - however I did read 0zZ-U's reply about using Midnight Commander... and LOL; I might just do that.

    HOWEVER, I can follow deons instructions to the tee - and it seems that both of
















































































































































































































































































































































































































































































































































































































    you have noted that it WILL work correctly; I just don't wanna mess around with
















































































































































































































































































































































































































































































































































































































    ~ anything... and p00f my /home/pi.

    I think I'll do the deon steps; but if I get scared the MC option is a dummies idea that I could also utilize here... hmmm.

    I GOT IT; I'm gonna try deon's suggestion on my BACKUP directory - but... Paulie, you idiot - that won't save you from any ~ directory erasing issues. UGH. While I know I can trust deon (and mLs) instructions, I'm gonna go 0zZ-U here and install MC. :P

    Damn nix.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/10/25 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From phigan@1337:1/202 to paulie420 on Wed Dec 8 03:01:51 2021
    I can understand the hesitation to try rming with the escape character, but you











































































































































































































































































































































































































































































































































































































    could just rename the directory the same way.

    Haha, I was about to type the command, but I'm on a Commodore 64 and don't have











































































































































































































































































































































































































































































































































































































    the correct slash or a tilde!

    if this command shows you what's in the directory:
    ls <slash><tilde>
    then this command will rename it to newdir:
    mv <slash><tilde> newdir

    --- Mystic BBS v1.12 A47 2020/11/22 (OnePlus6T/arm32)
    * Origin: phOnE In mY pOckEt BBS (1337:1/202)
  • From paulie420@1337:3/129 to phigan on Wed Dec 8 11:53:32 2021
    I can understand the hesitation to try rming with the escape character, but you could just rename the directory the same way.

    if this command shows you what's in the directory:
    ls <slash><tilde>
    then this command will rename it to newdir:
    mv <slash><tilde> newdir

    You know, thats another great suggestion that I just hadn't thought of. Good tip, and I'll remember to think of all commands in my arsenal when I hit these issues in the future.

    Great tips from all 3 of yous. Thanks.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/10/25 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From paulie420@1337:3/129 to deon on Wed Dec 8 12:02:56 2021
    OK, I would do this (avoid rm -r).

    You should be able to change into that directory with cd \~ (when you
    are in it's parent).

    [You can use the following to remove dir.]
    rmdir \~ (if it fails it wont below up your home directory :)

    This is the option I went with... and it was nice to learn about using '\' to move and command sub-directories.

    The other suggestions would have worked just fine, too - including renaming the











































































































































































































































































































































































































































































































































































































    sub-directory - but none of those were needed as deon set me straight in the first reply.

    Thanks, all - it was just a little bit tricky and I didn't wanna mess around with bad syntax when the home directory might have been in jeopardy. :P

    Its weird how Mystic created this directory in the first place; I've used the '~/mystic/whatever' format for things before, and I think its safer to always use the full '/home/user/mystic' style when calling directories in nix. I'll always use the full path from now on and replace any calls to the former if I see them.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/10/25 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)