Announcement

Collapse
No announcement yet.

how kan I delete a 9,9 GB folder?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how kan I delete a 9,9 GB folder?

    Dear All,
    I tried to delete the folder whose name is premier_lubuntu which contains a folder whose name is Logs which contains a 9,9 GB big file whose name is premier_lubuntu.vdi, but premier_lubuntu or path can't be found.
    I tried to delete premier_lubuntu.vdi but premier_lubuntu.vdi or path can't be found.
    (I also tried to delete the folders Lubuntu and Lubuntu_Kopie without any success, but the folder Parrot has been found)

    Code:
    auie@ThinkPad-L570:~$ cd Downloads
    auie@ThinkPad-L570:~$ cd VirtualBox\ VMs  
    auie@ThinkPad-L570:~/VirtualBox VMs$ rm -r premier_lubuntu
    rm: das Entfernen von 'premier_lubuntu' ist nicht möglich: Datei oder Verz
    eichnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ rm -r Lubuntu_Kopie  
    rm: das Entfernen von 'Lubuntu_Kopie' ist nicht möglich: Datei oder Verzei
    chnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ rm -rv Lubuntu_Kopie
    rm: das Entfernen von 'Lubuntu_Kopie' ist nicht möglich: Datei oder Verzei
    chnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ rm -rvi Lubuntu_Kopie
    rm: das Entfernen von 'Lubuntu_Kopie' ist nicht möglich: Datei oder Verzei
    chnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ sudo rm -r Lubuntu_Kopie  
    [sudo] Passwort für auie:  
    rm: das Entfernen von 'Lubuntu_Kopie' ist nicht möglich: Datei oder Verzei
    chnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ rm -r /home/auie/VirtualBox\ VMs/prem
    ier_lubuntu
    rm: das Entfernen von '/home/auie/VirtualBox VMs/premier_lubuntu' ist nich
    t möglich: Datei oder Verzeichnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ sudo rm -r /home/auie/VirtualBox\ VMs
    /premier_lubuntu
    [sudo] Passwort für auie:  
    rm: das Entfernen von '/home/auie/VirtualBox VMs/premier_lubuntu' ist nich
    t möglich: Datei oder Verzeichnis nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ cd /home/auie/VirtualBox\ VMs/premier
    _lubuntu
    bash: cd: /home/auie/VirtualBox VMs/premier_lubuntu: Datei oder Verzeichni
    s nicht gefunden
    auie@ThinkPad-L570:~/VirtualBox VMs$ cd /home/auie/VirtualBox\ VMs/Parrot
    auie@ThinkPad-L570:~/VirtualBox VMs/Parrot$ cd ..
    auie@ThinkPad-L570:~/VirtualBox VMs$ cd /home/auie/VirtualBox\ VMs/Lubuntu
    bash: cd: /home/auie/VirtualBox VMs/Lubuntu: Datei oder Verzeichnis nicht
    gefunden​
    Could you please help me to delete the folder premier_lubuntu and its files?

    #2
    What is actually in /home/auie/VirtualBox VMs 'right now'?
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      So could you post the output of ls -lh ~/VirtualBox\ VMs then?

      PS: or if you have exa installed we can see the whole directory tree within "VirtualBox VMs" at once with
      exa -lgbhT ~/VirtualBox\ VMs
      Last edited by Schwarzer Kater; Feb 23, 2023, 12:35 PM. Reason: added PS
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #4
        Originally posted by Schwarzer Kater View Post
        if you have exa installed
        Sweet! Nice replacement for ls!
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Originally posted by Snowhog View Post
          Sweet! Nice replacement for ls!
          Snowhog :
          Really off topic, sorry!

          But if you have not used exa before, installed it and liked it - consider putting something like the following into your .bash_aliases:
          Code:
          # ls replacement
          alias ls='exa -F --color=auto --group-directories-first'
          alias la='exa -aF --color=auto --group-directories-first'
          alias ll='exa -lFgbh --color=auto --group-directories-first'
          alias lla='exa -alFgbh --color=auto --group-directories-first'​
          It is good to have no double entries for e.g. "ll" in your .bashrc (comment them out there) - Canonical/Ubuntu puts some aliases in the .bashrc by default.


          And a bit more on topic:

          exa with the -T flag shows a tree view (for what I gave an example in my post above) - this can be helpful if one cannot find a certain directory or file but knows where it should be, like it seems to be the case for nicrnicr (only useful if the directory structure is not too deep, of course).

          To locate the directory you are looking for you could also simply:
          Code:
          cd ~/VirtualBox\ VMs
          find -iname *lubuntu*

          The primary task is to find the directory/file first:
          Originally posted by nicrnicr View Post
          […] Datei oder Verzeichnis nicht
          gefunden
          ​ - which means "file or directory not found".
          Deleting it should be easy.
          Last edited by Schwarzer Kater; Feb 26, 2023, 06:39 AM. Reason: added something on topic :-) and later changed "always" to "auto"
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment


            #6
            Thank you Snowhog and Schwarzer Kater,

            Code:
            auie@ThinkPad:~$ ls -lh ~/VirtualBox\ VMs
            total 20K
            drwxrwxr-x 3 auie auie 4,0K Jän  9 13:01  Lubuntu
            drwxr-xr-x 2 auie auie 4,0K Jän 10 23:13 'Lubuntu Kopie'
            drwxrwxr-x 4 auie auie 4,0K Jän 13 21:36  Parrot
            drwx------ 4 auie auie 4,0K Nov 30 16:11  Parrot-Klon-1-30-4-2022-Klon
            drwxrwxr-x 3 auie auie 4,0K Nov 30 16:05  premier_lubuntu
            auie@ThinkPad:~$

            Comment


              #7
              Hm, everything seems to be in place (in contrary to my premature assumption).

              I guess if you
              Code:
              cd ~/VirtualBox\ VMs
              rm -ri *
              the outcome is the same as above? -> be careful not to remove files or folders you wish to keep!

              Did you already run a fsck on the partition your "VirtualBox VMs" directory is on?
              Last edited by Schwarzer Kater; Feb 24, 2023, 05:50 AM. Reason: added warning
              Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
              Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

              get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
              install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

              Comment


                #8
                Originally posted by nicrnicr View Post
                'Lubuntu Kopie'
                This one directory name contains single quotes.

                Run sudo rm -r ~/VirtualBox\ VMs/'Lubuntu Kopie'

                That should remove that directory recursively.
                Using Kubuntu Linux since March 23, 2007
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Thank you Schwarzer Kater for your piece of advice:
                  Code:
                  auie@ThinkPad:~$ cd ~/VirtualBox\ VMs
                  rm -ri *
                  rm: descend into directory 'Lubuntu'?
                  rm: remove directory 'Lubuntu Kopie'?
                  rm: descend into directory 'Parrot'?​

                  I typed "enter", "enter", and then I don't rember how but I exited this process as I didn't want to remove Parrot. But I didn't read well. The question doesn't deal with removing.
                  When I go to the folder VirtualBox VM, nothing has been changed.

                  Then I did it once more:
                  Code:
                  auie@ThinkPad:~/VirtualBox VMs$ rm -ri *
                  rm: descend into directory 'Lubuntu'?
                  rm: remove directory 'Lubuntu Kopie'? y
                  rm: descend into directory 'Parrot'? n
                  rm: descend into directory 'Parrot-Klon-1-30-4-2022-Klon'? n
                  rm: descend into directory 'premier_lubuntu'? n
                  auie@ThinkPad:~/VirtualBox VMs$
                  ​
                  This time I only typed only "enter" to the first question, and "Lubuntu Kopie" has been removed.

                  I did it thrice:
                  Code:
                  auie@ThinkPad:~/VirtualBox VMs$ rm -ri *
                  rm: descend into directory 'Lubuntu'? y
                  rm: remove regular empty file 'Lubuntu/Lubuntu.vbox'? y
                  rm: descend into directory 'Lubuntu/Logs'? y
                  rm: remove regular file 'Lubuntu/Logs/VBox.log'? y
                  rm: remove directory 'Lubuntu/Logs'? y
                  rm: remove regular file 'Lubuntu/Lubuntu.vbox-prev'? y
                  rm: remove regular file 'Lubuntu/Lubuntu.vdi'? y
                  rm: remove directory 'Lubuntu'? y
                  rm: descend into directory 'Parrot'? n
                  rm: descend into directory 'Parrot-Klon-1-30-4-2022-Klon'? n
                  rm: descend into directory 'premier_lubuntu'? y
                  rm: remove regular empty file 'premier_lubuntu/premier_lubuntu.vbox'? y
                  rm: descend into directory 'premier_lubuntu/Logs'? y
                  rm: remove regular file 'premier_lubuntu/Logs/VBox.log.3'? y
                  rm: remove regular file 'premier_lubuntu/Logs/VBox.log'? y
                  rm: remove regular file 'premier_lubuntu/Logs/VBox.log.1'? y
                  rm: remove regular file 'premier_lubuntu/Logs/VBox.log.2'? y
                  rm: remove directory 'premier_lubuntu/Logs'? y
                  rm: remove regular file 'premier_lubuntu/premier_lubuntu.vbox-prev'? y
                  rm: remove regular file 'premier_lubuntu/premier_lubuntu.vdi'? y
                  rm: remove directory 'premier_lubuntu'? y
                  auie@ThinkPad:~/VirtualBox VMs$  ​
                  There are only 'Parrot' and 'Parrot-Klon-1-30-4-2022-Klon' left.
                  And there is only 3,5 GB left in the computer which was almost full, thought I removed much more than 9,9 GB.
                  I don't understand this.

                  Furthermore I couldn't install exa:
                  Code:
                  auie@ThinkPad:~/VirtualBox VMs$ apt install exa
                  E: Sperrdatei /var/lib/dpkg/lock-frontend konnte nicht geöffnet werden. - open (13: Permission denied)
                  E: Erlangen der Sperre für die Dpkg-Oberfläche (/var/lib/dpkg/lock-frontend) nicht möglich; sind Sie root?
                  auie@ThinkPad:~/VirtualBox VMs$
                  ​
                  Attached Files

                  Comment


                  • GreyGeek
                    GreyGeek commented
                    Editing a comment
                    I'm 81 but you taught this old dog a new trick! Thanks!

                    PS - I noticed that "ll | less" doesn't work but "ll | more" does.
                    Last edited by GreyGeek; Feb 25, 2023, 10:47 AM.

                  #10
                  Originally posted by nicrnicr View Post
                  […]
                  There are only 'Parrot' and 'Parrot-Klon-1-30-4-2022-Klon' left.
                  And there is only 3,5 GB left in the computer which was almost full, thought I removed much more than 9,9 GB.
                  I don't understand this.

                  Furthermore I couldn't install exa:
                  […]
                  Glad it has worked out - somehow…
                  No idea about the 3.5 and 9.9 GB - but did you restart your computer and run fsck to be sure?

                  To install something in CLI you have to have elevated privileges (therefore "Permission denied") - as a standard user you have to use sudo on K(U)buntu :
                  sudo apt install exa
                  Last edited by Schwarzer Kater; Feb 25, 2023, 09:28 AM. Reason: typos
                  Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                  Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                  get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                  install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                  Comment


                    #11
                    @GreyGeek:
                    You're welcome.
                    How could you answer inside my post?

                    Thank you Scharwer Kater for your answer.
                    There is 13,5 GB free space after a new start.

                    This is what happens when I write fsck:
                    Code:
                    auie@ThinkPad:~$ fsck
                    fsck from util-linux 2.37.2
                    e2fsck 1.46.5 (30-Dec-2021)
                    /dev/sda7 is mounted.
                    
                    
                    
                    WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***
                    cause ***SEVERE*** filesystem damage.
                    
                    
                    Do you really want to continue<n>? no
                    check aborted.
                    auie@ThinkPad:~$
                    ​

                    Comment


                      #12
                      My description was not clear enough, my bad:
                      you can/should not run fsck on a file system that is mounted (and your / ("root") file system is mounted during you use your computer).

                      One could do this by e.g. either booting from another system partition on the same computer or an USB stick:
                      In Konsole (or another terminal emulator) lsblk (or lsblk -f to get a slightly different output) to determine the partition you want to check. Be sure that the partition is not mounted, otherwise sudo umount path_to_the_partition_you_want_to_check, for example sudo umount /dev/sdc5
                      Then sudo fsck path_to_the_partition_you_want_to_check, for example sudo fsck /dev/sda7
                      Last edited by Schwarzer Kater; Feb 26, 2023, 09:09 AM. Reason: typos
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #13
                        off topic

                        GreyGeek:
                        Interesting - this seems to be the "fault" of less, which seems not to be able to process the colour code control characters:
                        If you pipe ls -hlFV with the --color=always flag into less the output is also scrambled (a bit "less" with ls than with exa, though ).

                        Change it to --color=auto and it works (I did so above and in my .bash_aliases now).
                        It seems that with the --color=auto flag the colour code control characters are automatically removed if piped into something.
                        If you want colour in | more you will have to add it manually then…

                        Thank you for this observation!
                        Last edited by Schwarzer Kater; Feb 26, 2023, 06:46 AM. Reason: typos
                        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                        Comment


                          #14
                          Thank you Schwarzer Kater

                          Comment

                          Working...
                          X