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 15 posts - 16 through 30 (of 43 total)
  • Author
    Posts
  • #89415
    Member
    blur13
    Helpful
    Up
    0
    ::

    I followed the advice on this post:

    https://hund.tty1.se/2019/02/09/how-to-copy-move-and-delete-files-in-your-shell-the-safe-way.html

    Its saved me a few times from accidently deleting files when using the terminal.

    Basically, add the following to .bashrc

    alias cp=’cp -i’
    alias mv=’mv -i’
    alias rm=’mv -i’

    and you have to confirm the action before it is executed.

    But even thats not foolproof, I’ve still managed to delete stuff by absentmindedly confirming. So a backup really is the way to go. LuckyBackup is included in antix, basically its rsync but more user friendly.

    #89416
    Member
    stevesr0
    Helpful
    Up
    0
    ::

    Hi all,

    I followed the PPC’s instructions for using trash-cli with zzzfm in his April 26, 2021 post (#58076) and it kinda worked. (N.B. This is without the ft10-transformation pack being installed.)

    I now have a ~/.local/share/Trash/files/ directory which holds the trash can files.

    I haven’t gotten the “Delete” option to send files to the trash directory instead of deleting them.

    The keyshortcut box popup just asks for a keycode to be set, but it doesn’t (obviously) offer an option to link the delete selection to the trash file. Perhaps there has been a change in the zzzfm files since April 2021, that has effected the “key shortcut” actions or I am just dense (english for stupid <g>).

    It also works from the command line (using the command trash followed by the location of the file).

    Very nice work PPC!!

    stevesr0

    • This reply was modified 1 week, 3 days ago by stevesr0.
    • This reply was modified 1 week, 3 days ago by stevesr0.
    • This reply was modified 1 week, 3 days ago by stevesr0.
    #89420
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    ::

    Best wishes for your trash folder and a decent backup strategy; it’s good to have both, especially if you ever have a hardware failure or blindly delete files, folders and trash can contents.

    Even a relatively good system can still fail; good example: power failure and fried hardware during an electrical storm; that happened to me once and I had to replace a power supply!

    The local computer store had equipment fried too so as a repeat customer they gave me a free replacement power supply but it did happen to me, even though I had a surge protector; otherwise it would have been much worse!

    Brian Masinick

    #89423
    Member
    stevesr0
    Helpful
    Up
    0
    ::

    Hi PPC,

    On my Sid install, WITHOUT installing ft10, the “new command” popup shows both boxes; one for the title and the other to insert (as instructed) gtk-delete. In my new install of antiX-21 full stable, even after installing the ft10-transformation package (but not enabling it), the “new command” popup only shows a box for the command name (trash %F).

    As I like a minimalist desktop, I don’t want to have to enable ft10-transformation in order to find/run the script. I recall that the script is supposed to be usable after installing ft10 wihtout activating it.

    Appreciate clarification on what I am doing wrong.

    Thanks.

    Hi Brian M,

    Thanks for good wishes.

    I have a 256 GB USB flash drive that I plan to start using to backup files in all three computers. That will be a limited backup obviously and very manual, while I figure out something “fancier” (and better). The benefit of that backup is it can stick (<g>) with me, so if my home burned down (or was robbed) in my absence, I would still have the files! (Whether that would make me feel happy is unlikely.)

    stevesr0

    #89424
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    ::

    Regarding your Flash Drive, that should be fine; daily back-up used to be the norm in the “tape backup” days.
    These days, it’s important to back up any time you have really important content that you do not want to lose;
    if most of it is in the Cloud, no problem; that already gets backed up; if it’s local, that’s when it needs backup.

    Best wishes!

    Brian Masinick

    #89439
    Member
    techore
    Helpful
    Up
    0
    ::

    Very interesting… I have been using btrfs for antiX but never paid attention to recovery feature. I am curious of your experience, such as easiness of use of snapshots in practice.

    @olsztyn, recovery is pretty darn simple. Just a matter of learning the btrfs command or installing timeshift or snapper.

    It’s late but I did a quick hunt. Take a look at the comments for the time stamp demonstrating a recovery using btrfs and timeshift.

    https://www.youtube.com/watch?v=i8HDHAX1RJc

    btrfs is relatively new to me versus zfs, but no problems to date. Notice he uses live media to complete the recovery due to @ or root file system being munched. Totally unnecessary to recover @home (/home).

    #89445
    Member
    olsztyn
    Helpful
    Up
    0
    ::

    btrfs is relatively new to me versus zfs, but no problems to date.

    Thanks for sharing your experience. Appreciate. I will play with btrfs recovery on my antiX installs…

    Live antiX Boot Options (Previously posted by Xecure):
    https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

    #89449
    Moderator
    BobC
    Helpful
    Up
    0
    ::

    My most common losses over the years have been from making changes to code and having to revert to previous versions. I have covered this now by implementing a date/timestamp multi-backup versioning system for all files edited, and only using Geany to edit. I wish I had a better editor (like Brief which I once used, never could get Grief to work under Linux), but in the Linux world I just haven’t found a really good one that I’m comfortable with. I use Notepad++ at work because its the only one available there that I’m comfortable with. For Linux, I have been considering Visual Studio Code, but hate like heck to ever tie myself in with anything from MS again after all the letdowns they have dealt me over the decades. I have the tutorial videos, just not the time/energy. I don’t even know if it supports multi-version backups.

    My second most impactful losses have come from disk failures and general OS failures. In the windows world, the track record has been abysmal, and the only things that have saved me are full OS reloads and copies of my personal folders. In Linux world with a few exceptions, its been similar. I have settled on making/keeping flashdrives with my main system OS and /home stuff, but I should be doing these on a more organized, automated and regular basis.

    I worry that we have many ways to delete things, not just with any one file manager, and I wish they would all support the same bottom level methodology of deleting, restoring, and later purging on demand. The most common ways I delete things are:
    1. mc – midnight commander
    2. zzzfm
    3. command line
    4. Rox-filer

    I forget how the other Linux file managers handle it, but I’m pretty sure they are different, and again, I would much prefer a seamless solution, where it doesn’t matter which program did the delete, and maybe that needs to be at the OS or filesystem level to really be correct. I probably should investigate more.

    #89454
    Member
    marcelocripe
    Helpful
    Up
    0
    ::

    Hello stevesr0.

    As I like a minimalist desktop, I don’t want to have to enable ft10-transformation in order to find/run the script. I recall that the script is supposed to be usable after installing ft10 wihtout activating it.

    You can enable FT10, enable the Recycle Bin setting in the checkbox and then disable FT10. Or follow one of the PPC tutorials on Trashcan Possible? or at Portuguese Adicionar “Reciclagem” ou “Lixeira” ao antiX.

    – – – – –

    Olá stevesr0.

    As I like a minimalist desktop, I don’t want to have to enable ft10-transformation in order to find/run the script. I recall that the script is supposed to be usable after installing ft10 wihtout activating it.

    Você pode ativar o FT10, ativar a configuração da Lixeira na caixa de opções e em seguida desativar o FT10. Ou seguir um dos tutoriais do PPC sobre Trashcan Possible? ou em Português Adicionar “Reciclagem” ou “Lixeira” ao antiX.

    #89499
    Member
    stevesr0
    Helpful
    Up
    0
    ::

    Hi marcelocripe,

    Thanks for reply.

    I did try following that tutorial you linked. I couldn’t get the delete button to send things to the trash file.

    On the antiX-21 stable system, I will try the enable/disable FT10 approach you suggest. I looked for the .sh file that is supposed to be included, but I couldn’t find it after installing the ft10-transformation package WITHOUT enabling it and I didn’t want to try anymore that night.

    stevesr0

    ———————————————

    Oi marcelocripe,

    Obrigado pela resposta. Eu tentei seguir aquele tutorial que você vinculou. Não consegui o botão de exclusão para enviar coisas para o arquivo de lixo. No sistema estável antiX-21, tentarei a abordagem FT10 habilitada/desativar que você sugere. Procurei o arquivo.sh que deveria ser incluído, mas não consegui encontrá-lo depois de instalar o pacote de transformação ft10 SEM habilitá-lo e não queria mais tentar naquela noite.

    stevesr0

    ————————————————–

    Hi BobC and Brian M,

    Thanks for your comments.

    stevesr0

    #89523
    Member
    marcelocripe
    Helpful
    Up
    0
    ::

    Stevesr0, you will need to create a new entry as described by PPC:

    3– In the SpaceFM contextual menu, which appears when you click on a file or folder, you will see a new option, following the previous example, it will be “Send to Recycling” (or any other name you have chosen in the previous steps) . It remains to associate this new command with the “Delete” key. To do so, select that new menu entry with the mouse/mouse pointer and right-click. Click on “Key shortcut”/”Keyboard shortcut”. A window titled “Define key” will appear. Press the “Delete” (or “Del”) key on your keyboard. The content of the window will change, to inform that this key is already assigned to another command (the command that definitively eliminates what was selected). To confirm that you want to associate it with this new command, click on the last button in that window, “Defined”.

    4-Do you want to move the trashcan icon from the Delete/Delete entry to the new entry?:
    Right-click on a file/file > Select the “delete” option > Properties > In the Icon/Icon section: delete “gtk-delete” and click OK.
    Right-click on a file/file > Select the option “send to recycling” (or whatever name you have given your new entry) > Properties > In the Icon/Icon section: enter (without quotes ) “gtk-delete” > Click OK.

    Or

    2- enable only zzzfm additions (which include Trash/Recycle Bin): antiX menu > Terminal > and run the command:
    f10-fm-config.sh

    – – – – –

    Stevesr0, você precisará criar uma nova entrada conforme foi descrito pelo PPC:

    3– No menu contextual do SpaceFM, que surge ao clicar sobre um ficheiro ou pasta, verá uma nova opção, seguindo o exemplo anterior, será “Enviar para a Reciclagem” (ou qualquer outro nome que tenha escolhido nos passos anteriores). Falta associar este novo comando à tecla “Delete”. Para o fazer, selecione essa nova entrada do menu com o ponteiro do rato/mouse e faça clique com o botão direito. Clique em “Key shortcut”/”Atalho do teclado”. Irá surgir a janela com o titulo “Definir chave”. Carregue na tecla, do seu teclado “Delete” (ou “Del”). O conteúdo da janela irá alterar, para informar que essa tecla já se encontra assignada a outro comando (o comando que elimina definitivamente aquilo que foi selecionado). Para confirmar que pretende associa-la a este novo comando, clique no último botão dessa janela, “Definido”.

    4-Quer passar o ícone da lixeira da entrada Delete/eliminar para a nova entrada?:
    Clique com o botão direito do rato/mouse sobre um ficheiro/arquivo > Selecione a opção “eliminar” > Propriedades > Na secção Icon/Ícone: apague “gtk-delete” e clique em OK.
    Clique com o botão direito do rato/mouse sobre um ficheiro/arquivo > Selecione a opção “enviar para a reciclagem” (ou qualquer outro nome que tenha dado à sua entrada nova) > Propriedades > Na secção Icon/Ícone: insira (sem aspas) “gtk-delete” > Clique em Ok.

    Ou

    2- ativar apenas as adições do zzzfm (que incluem a Lixeira/Reciclagem): menu do antiX > Terminal > e execute o comando:
    f10-fm-config.sh

    #89565
    Member
    stevesr0
    Helpful
    Up
    0
    ::

    Hi marcelocripe,

    I followed those instructions and they work to a point.

    The “Delete” option no longer is associated with the Delete key. When I use the delete key, the file goes to the Trash (= Recycle) subdirectory.

    However, when I select the file with the mouse and then in the menu select “Delete” with the mouse, I am asked if I want to delete the file. If I say yes, the file still gets deleted NOT transferred to the trash directory.

    In addition, when I opened a root window in zzzfm, I realize that no Trash option has been added. That apparently is treated as a separate application in this regard.

    With those limitations, I do appreciate having a trash/recycle bin.

    Thanks for help.

    stevesr0

    ————————————————————————-
    (Aparentemente hoje, o português do Brasil não é mais uma opção no Google Translate, apenas o português!?)

    Olá marcelocripe,

    Eu segui essas instruções e elas funcionam até certo ponto.

    A opção “Excluir” não está mais associada à tecla Delete. Quando uso a tecla delete, o arquivo vai para o subdiretório Lixo (= Reciclar).

    No entanto, quando seleciono o arquivo com o mouse e, em seguida, no menu, seleciono “Excluir” com o mouse, é perguntado se desejo excluir o arquivo. Se eu disser sim, o arquivo ainda será excluído NÃO transferido para o diretório da lixeira.

    Além disso, quando abri uma janela raiz no zzzfm, percebi que nenhuma opção Trash foi adicionada. Que aparentemente é tratado como um pedido separado a este respeito.

    Com essas limitações, eu aprecio ter uma lixeira/lixeira.

    Obrigado pela ajuda.

    stevesr0

    #89566
    Member
    stevesr0
    Helpful
    Up
    0
    ::

    re: TRIM settings in SSDs.

    Feedback from folks on my local LUG (Asheville, NC area) alerted me to the facts that (1) “periodic TRIM” is recommended by a number of distributions – including Debian (rather than continuous/immediate) and (2) that this feature is subject to individual customization (daily TRIM, weekly TRIM, (maybe) at a certain number of megabytes of deleted but not ‘trimmed” files.

    I am interested in how ssd users have setup TRIM on their drives.

    Thanks for any feedback.

    stevesr0

    #89567
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    ::

    Here are a few sites I found that discuss the use of TRIM on Linux systems:

    https://kb.plugable.com/data-storage/trim-an-ssd-in-linux
    According to this site: “When a file is no longer needed by the file system, the TRIM command can be sent to the SSD to help the built-in garbage collection utility determine which memory locations need to be maintained and which can be ignored. Maintaining unnecessary memory locations takes time and can slow down read and write access to the drive.”

    https://opensource.com/article/17/1/solid-state-drives-linux-enabling-trim-ssds
    In this article, they explain WHY TRIM is necessary with SSD vs HDD:

    “On traditional magnetic drives, deleted files are not completely removed from the disk at the time of deletion. This is why you can recover deleted files. Essentially, the filesystem just references the location of a file on the disk, and when a file is deleted, that reference is erased, allowing you to write new data over old data in these blank spaces. However, with SSDs, new data can only be written on completely new or erased cells of the drive. Because the space must be cleared prior to a write, if enough free space is not already available at the time a file is being written, it must be erased first. This can negatively affect performance.

    If the operating system were to erase unused space before writing new data, at a time when the device is not simultaneously trying to write, file saving performance could be improved. Enter TRIM. A TRIM command essentially allows your operating system to tell the drive which areas of data are no longer being used so that it come wipe them, speeding up the drive for future writes, and providing users of SSDs with a more optimum experience.”

    The article also references Chapter 21 of Red Hat training regarding Solid-State Disk Deployment Guidelines:
    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-ssd

    Siduction is one of the distributions that I’ve used with great success on my Acer Aspire A515-55, the first system I’ve used with NVME SSD; siduction is the absolute fastest of any system I’ve used, and in fact, Ferdinand Thommes has written multiple research articles on the work he and the siduction team have been working on since 2011. They’ve done a lot since then, but this articles here may give you more specific information than some of the other articles, so perhaps these two articles found in this search will be more specifically helpful to you:
    https://siduction.org/?s=SSD+trim

    I hope that helps, especially the siduction search.

    Brian Masinick

    #89568
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    ::

    More from https://siduction.org/2014/10/revisting-an-article-on-how-to-set-up-solid-state-disks-with-linux/
    “Recent guidance [4] recommends using the fstrim utility periodically, rather than using the “discard” filesystem mount option.”
    (script shown)…
    Save it as /etc/cron.weekly/fstrim_job. = so there is one specific suggestion: a weekly job to run periodic fstrim operations.

    Brian Masinick

Viewing 15 posts - 16 through 30 (of 43 total)
  • You must be logged in to reply to this topic.