Seeking help with UNdeleting a directory

Forum Forums New users New Users and General Questions Seeking help with UNdeleting a directory

  • This topic has 42 replies, 11 voices, and was last updated Sep 25-1:42 am by stevesr0.
Viewing 13 posts - 31 through 43 (of 43 total)
  • Author
    Posts
  • #89595
    Member
    marcelocripe
      Helpful
      Up
      0
      ::

      Hello stevesr0.

      Yesterday I managed to prepare a tutorial on how to use the “f10-fm-config.sh” script that the PPC created and is available at Configurator Manager zzzFM Files for antiX 21. The tutorial has the step by step of what to do to use the script “f10-fm-config.sh”, it has the screenshots of each customization that I did after running the “f10-fm-config.sh”, an option for Brazilian Portuguese speakers that only allows you to copy the settings and paste them into the correct folder. The explanatory text file is in Brazilian Portuguese language, I made a copy of the file in English language from the automatic translation. If you review the machine translation texts, please send me your corrected file that I make available on archive.org.

      The right-click menu options are:
      Delete – will permanently delete the file or folder. The same effect you get with the key combination “Shift+Delete”.
      Move to Trash – moves or sends the file or folder to /home/your username/.local/share/Trash/files. The same effect you get with the “Delete” key.

      Another option with the Recycle Bin and the customizations that PPC taught us are in Configurations from zzzFM File Manager with Recycle Bin for antiX 21 in pt-BR language, but with much less features that are available in “f10-fm-config.sh”.

      (Apparently today, Brazilian Portuguese is no longer an option in Google Translate, only Portuguese!?)
      Despite displaying only the “Portuguese” option, the texts are in the “Brazilian Portuguese” language and Google does not always translate the words into English. Google’s programmer must think that we understand the English language (lots of laughter), maybe it’s to practice English with our Spanish-speaking neighbors (lots of laughter), with the exceptions: Guyana (English language), French Guiana (French language ), Suriname (Dutch language and Falkland language (English language) which are thousands of kilometers from where I live. Thank you for your kindness.

      #89596
      Member
      marcelocripe
        Helpful
        Up
        0
        ::

        Olá stevesr0.

        Ontem eu consegui preparar um tutorial de como utilizar o script “f10-fm-config.sh” que o PPC criou e está disponível no Configurador do Gerenciador de Arquivos zzzFM para o antiX 21. O tutorial possui o passo a passo do que fazer para utilizar o script “f10-fm-config.sh”, possui as capturas de tela de cada personalização que eu fiz após executar o “f10-fm-config.sh”, uma opção para os falantes do Português do Brasil que permite apenas copiar as configurações e colar na pasta correta. O arquivo de texto explicativo está em idioma Português do Brasil, eu fiz uma cópia do arquivo em idioma Inglês a partir da tradução automática. Se você fizer a revisão dos textos da tradução automática, por favor, me envie o seu arquivo corrigido que disponibilizo no archive.org.

        As opções do menus do clique do botão direito são:
        Excluir – irá apagar permanentemente o arquivo ou a pasta. O mesmo efeito você consegue com a combinação de teclas “Shift+Delete”.
        Mover para a Lixeira – move ou envia o arquivo ou a pasta para /home/seu nome de usuário/.local/share/Trash/files. O mesmo efeito você consegue com a tecla “Delete”.

        Uma outra opção com a Lixeira e com as personalizações que o PPC nos ensinou estão no Configurações do Gerenciador de Arquivos zzzFM com a Lixeira para o antiX 21 em idioma pt-BR, mas com muito menos recursos que estão disponíveis no “f10-fm-config.sh”.

        (Aparentemente hoje, o português do Brasil não é mais uma opção no Google Translate, apenas o português!?)
        Apesar de exibir apenas a opção “Português”, os textos são do idioma “Português do Brasil” e nem sempre o Google traduz as palavras em Inglês. O programador do Google deve achar que a gente entende o idioma Inglês (muitos risos), talvez seja para praticarmos Inglês com os nossos vizinhos que falam Espanhol (muitos risos), salvo as exceções: Guiana (idioma Inglês), Guiana Francesa (idioma Francês), Suriname (idioma neerlandês e Falkland (idioma Inglês) que estão há milhares de quilômetros da onde eu resido. Eu agradeço por sua gentileza.

        #89597
        Member
        Borg
          Helpful
          Up
          0
          ::

          I know that is kinda too late with advice, but better late than never.
          Just try to use VFS (Versioned File System) whatever you can for
          importand directories like My Documents, Projects, etc..

          If you cant use true VFS (not much really exist), try to use VFS repo managers.
          SVN is full blown VCS, but will do.

          I wrote myself a tiny repo manager specialized for VFS (binary files handling).
          If you are interested, PM me.. Ill give you url to my GIT repo.

          • This reply was modified 7 months, 2 weeks ago by Borg.
          • This reply was modified 7 months, 2 weeks ago by Borg.
          #89600
          Member
          Robin
            Helpful
            Up
            0
            ::

            Since this is about USB-Pendrives, this thread may be worth reading. An expert, researching in this area, talks about manufacturers buying cheap chip production wastage of other manufacturers, marking some sectors as bad internally so everything looks fine from the outside at the first glance, the problems start later only.

            Unfortunately I had to learn myself that many of my own USB sticks originate from this manufacturer, even when labeled completely differently. At least I do know now I don’t need to look for faulty USB drivers in Linux any longer when seeing something like this in my dmesg:

            $ sudo dmesg | tail
            [10965930.518601] print_req_error: I/O error, dev sdb, sector 1936360
            [10965934.659347] sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
            [10965934.659356] sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 58 16 78 00 00 20 00
            [10965934.659360] print_req_error: I/O error, dev sdb, sector 5772920
            [10965937.954199] sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
            [10965937.954210] sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 1f 0b f8 00 00 20 00
            [10965937.954216] print_req_error: I/O error, dev sdb, sector 2034680
            [10965944.375637] sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
            [10965944.375647] sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 30 96 50 00 00 40 00
            [10965944.375653] print_req_error: I/O error, dev sdb, sector 3184208

            or

            $ sudo dmesg | tail
            [10966472.807044] Buffer I/O error on dev sdd1, logical block 13631488, lost async page write
            [10966472.807075] print_req_error: I/O error, dev sdd, sector 121636864
            [10966472.807079] Buffer I/O error on dev sdd1, logical block 15204352, lost async page write
            [10966472.807122] print_req_error: I/O error, dev sdd, sector 121636896
            [10966472.807126] Buffer I/O error on dev sdd1, logical block 15204356, lost async page write
            [10966472.807947] print_req_error: I/O error, dev sdd, sector 122775424
            [10966472.807951] Buffer I/O error on dev sdd1, logical block 15346672, lost async page write
            [10966472.807964] Buffer I/O error on dev sdd1, logical block 15346673, lost async page write
            [10966472.807969] Buffer I/O error on dev sdd1, logical block 15346674, lost async page write
            [10966472.901336]  sdd: sdd1 sdd2

            Just throw this stick away and make sure to get better quality from your hardware supplier next time…

            Btw, you can try to copy your data even from those sticks to an image on your hard drive by using dd :
            sudo dd if=/dev/sdc of=/media/_daten3/restore/usb-drive-01.img bs=1M status=progress
            For me this method worked twice already.

            And when it’s about recovery of deleted files in general, which is now way more complicated than in the old days, when flipping a byte was enough to restore the file (in case it was not physically overwritten already), this thread may be of some interest. Now you have to grab for broken pieces within a bunch of inodes always, which was the very last option only in the old days in case of fatal file system failure.

            Windows is like a submarine. Open a window and serious problems will start.

            #89609
            Member
            stevesr0
              Helpful
              Up
              0
              ::

              Hi Brian M,

              Thanks for the link. I looked that over and also one from a digitalocean.com(/community/tutorials/how-to-configure-periodic-trim-for-ssd-storage-on-linux-servers).

              I plan to practice on one of my systems which currently doesn’t have TRIM enabled.

              Apparently, the procedure is (1) make sure that “discard” (continuous trimming) is disabled and (2) write a script (/etc/cron.weekly/fstrim) which includes the path and a line
              /sbin/fstrim --all || true

              The script has to be made executable
              sudo chmod +x /etc/cron.weekly/fstrim

              I will implement that on this machine and then see if it seems to be working by writing test files and deleting them.

              stevesr0

              #89610
              Moderator
              Brian Masinick
                Helpful
                Up
                0
                ::

                Yeah, the “simple explanation” is to set up /sbin/fstrim to run periodically, and weekly seems to be a reasonable choice.

                As far as I can tell, this is NOT an urgent thing unless your disk doesn’t have many places to put new data, and is forced immediately to start clearing blocks with zero so they can be reused.

                I ran my previous system for quite a while, and I rarely had partitions that were 50% or more full, so I didn’t even consider doing this. I think it makes sense, but I’m creating a new system on my brand new HP 14 fq1024nr laptop, and it has NVME SSD like the previous one. Now that I know about this too, I’ll eventually add this procedure to my distributions.

                --
                Brian Masinick

                #89612
                Member
                stevesr0
                  Helpful
                  Up
                  0
                  ::

                  Hi marcelocripe,

                  I just read thru the four page English machine translation and I will try to get any suggested changes and/or questions to you in a few days. I will try out the script over this weekend (it is nearly 2000 here which gets close to my bedtime (<g>)).

                  Thanks for the configurator.

                  stevesr0

                  —————————————-

                  Olá marcelocripe,

                  Acabei de ler a tradução automática de quatro páginas em inglês e tentarei obter quaisquer alterações sugeridas e/ou perguntas para você em alguns dias. Vou experimentar o roteiro neste fim de semana (são quase 2000 aqui que chega perto da minha hora de dormir (<g>)).

                  Obrigado pelo configurador.

                  stevesr0

                  • This reply was modified 7 months, 2 weeks ago by stevesr0.
                  • This reply was modified 7 months, 2 weeks ago by stevesr0.
                  #89613
                  Member
                  stevesr0
                    Helpful
                    Up
                    0
                    ::

                    Hi Borg,

                    I am acquainted with applications that would keep multiple versions of documents but not a file system that does that. It sounds like a built in backup mechanism.

                    I am not sure that I need multiple versions as a retired person, but rather to ensure that I have protection from accidental loss of documents that I don’t want to lose.
                    If you could suggest a reference that explains the utility for endusers like myself, I would appreciate it.

                    Thanks for responding.

                    stevesr0

                    #89614
                    Member
                    stevesr0
                      Helpful
                      Up
                      0
                      ::

                      Hi Robin,

                      Thanks for the references. I will try to chew on them over the next few days.

                      stevesr0

                      #89627
                      Member
                      ModdIt
                        Helpful
                        Up
                        0
                        ::

                        For flash drives please take the good advice Robin gave seriously.

                        Flash drives are different to HDD, overwriting all cells is not a good idea.
                        Depending on the controller and the amount of data on the drive a file delete
                        can be almost instantanious. Depending on delayed FS Trim is possibly fine on
                        a third full drive, as the drive fills up the controller will use any areas
                        marked as deleted to maximize contiguos space for writes. The user has no
                        influence on internal actions on USB sticks, SSD, including NVME.
                        Manufacturer algorithms are boss.

                        Buying: buy from a serious service orientated company and manufacturer, check
                        the warranty, if under 5 years i would not buy.
                        We Users and family recieved fakes even from amazon.
                        After providing pertinent information to amazon service we were fully refunded
                        very quickly, I reordered and had replacement drives in two days.

                        Our local electronics palace charges twice the price and refers customers to
                        the manufacturer after 6 Months. The manufacturer proceedure is often, in
                        postal charges for an RMA return more expensive than a decent new stick…

                        Some Transcend drives can be fixed with an online tool from the manufacturer.
                        I have two of those. NOTE all data will be lost if a repair is attempted.
                        Corrected controller software is written and the memory re initialized.
                        Caveat, you need windoze. test version is enough.

                        Good drives will have reserve memory to replace failed cells.
                        We found marked 32 GB cheap USB Sticks which would choke on 8GB, one even on 4.
                        The buyer wanted to save about 2 euro and lost data. Those drives were trash.

                        Warranty, not worth the effort.
                        The dealer who is in Guangshou said he was also ripped off, that is
                        unaware of problems until I mailed him and he did some tests.
                        He would have replaced, I said thanks and forget it. Due to EU import
                        regulations way too expensive and troublesome.

                        • This reply was modified 7 months, 2 weeks ago by ModdIt.
                        • This reply was modified 7 months, 2 weeks ago by ModdIt.
                        #89636
                        Member
                        Borg
                          Helpful
                          Up
                          0
                          ::

                          stevesr0: it depends about your mentality and work flows. I come from programing world
                          where VCS is a king, so I have some habbits. I also work on other projects that involve
                          binary files that are important (backup) and I even tho I cannot make diff out of them
                          having old version is handy in case of some catastrophic event. Its just nice to have
                          posibility to rollback. Additionaly, using repo manager for VFS give you ability to sync
                          your files between other computers or even other storage (backup).

                          Thats why I wrote my DOT (Distributed Object Tracker repo manager) to handle those basic
                          VFS requiremebts for importand files. Its peer2peer repo manager, that can handle abritrary
                          binary files. Anything that is importand to me, its stored in DOT.

                          Pros:
                          – versioned filesystem
                          – data and metadata its checksumed (SHA1)
                          – no need to worry about backups (multiple compies)
                          – easy sync between desktop laptop, so I dont get lost whats really happens
                          – portability (Unix, Linux, POSIX, Cygwin)

                          Cons:
                          – more storage is really needed for all versions of files
                          – need good habbits about commiting work and syncing
                          – its CLI program

                          #89669
                          Member
                          stevesr0
                            Helpful
                            Up
                            0
                            ::

                            Hi Robin and Moddit,

                            Thanks for emphasizing that. “Bad” hardware makes trying to run/test “good” software very confusing <g>.

                            My basic USB flash drives are Sandisk and Lexar brands. They seem to work. I haven’t tried to test whether they are aging out because of that. It will be another learning experience.

                            Hi Borg,

                            Thanks for the explanation. I can see that if the reliable usability of a system is important, the ability to rollback after an update causes a failure to boot would be very useful.

                            To all,

                            I would like feedback about the following (draft) plans to recover the deleted directory which triggered this whole thread.

                            My strategy is to DISABLE TRIM by editing the /etc/fstab before booting the partition that held the deleted directory. (Hopefully, mounting the /root partition that holds /etc/fstab will not enable trimming on the unmounted /home partition.) If this works, then I will mount the /home partition and attempt to recover the deleted directory or its files.

                            OPTION #1: Using an antiX live Usb,

                            Boot without allowing the linux partitions on the internal hard drive to automount (Rescue or Single User).
                            (I am starting to search how to do this with antiX. An alternative would be a rescue boot distro?)

                            If I can do this, then I would mount only the /root partition and edit /etc/fstab to disable TRIM using the “relatime,nodiscard” as an option. (I haven’t seen a complete example of the syntax so I am guessing that “relatime,nodiscard 0 0” MIGHT work.

                            If that works, I could then mount the /home partition and attempt to recover the directory using one of the ext4 capable undelete programs (extundelete, ext4magic or other).

                            Option #2. Booting into Windows on a separate internal hard drive.

                            I have both Windows and Linux on this machine installed on separate internal hard drives. I figure that the linux hard drive partitions shouldn’t be automounted if I launch Windows.

                            If that is correct, then I would hopefully be able to

                            (a) use a reader tool (“Linux Reader” or other) to identify the linux /root partition that holds my fstab file.

                            —If that is different from the one holding the /home partition (I think I set it up that way), then

                            (b) Use a (Ext2FSD, EXT2Explore or other) to mount just the /root partition with the /etc folder.

                            (c) edit the /etc/fstab file to disable trim (relatime, nodiscard 0 0, )

                            (c) Reboot into linux and use one of the undelete programs (extundelete or ext4magic or other) to attempt to recover the directory and/or its files.

                            Comments, references and alternative approaches all sought and appreciated.

                            stevesr0

                            #89709
                            Member
                            stevesr0
                              Helpful
                              Up
                              0
                              ::

                              Hi marcelocripe,

                              re: the f10-fm-config.sh.

                              I tried it out on a new antiX-21 install. The trash and delete options work as with my Sid install that just used trash-cli without the transformation package.

                              I was under the impression that if done correctly, the Delete menu item could be set to send stuff to trash/recycle instead of really deleting. As I reflect on that, it would make no sense.

                              So I guess everything is working (trash/delete functions) as PPC and you intend.

                              stevesr0

                              ————————————-

                              Olá marcelocripe,

                              re: o f10-fm-config.sh.

                              Eu tentei em uma nova instalação do antiX-21. As opções trash e delete funcionam como na minha instalação do Sid que acabou de usar trash-cli sem o pacote de transformação.

                              Fiquei com a impressão de que, se feito corretamente, o item de menu Excluir poderia ser definido para enviar coisas para o lixo/reciclagem em vez de realmente excluir. Ao refletir sobre isso, não faria sentido.

                              Então eu acho que tudo está funcionando (funções de lixeira/excluir) como PPC e você pretende.

                              stevesr0

                              • This reply was modified 7 months, 2 weeks ago by stevesr0.
                              • This reply was modified 7 months, 2 weeks ago by stevesr0.
                            Viewing 13 posts - 31 through 43 (of 43 total)
                            • You must be logged in to reply to this topic.