Welcome to the Linux Foundation Forum!

Shell scripting

Hi there, i was wondering if anyone would be able to help with a shell scripting problem. I am very new to linux and need to create three shell scripts, 1 to delete files to the trash can the next to remove the files from the trash can and the final to restore the files from the trash can

any help would be greatly appreciated thanks :)

Comments

  • ben
    ben Posts: 134
    Do you want to create "your own trash" or just reuse something from your desktop manager ?
    Are you using Gnome/KDE/something else ?

    On Gnome:
    trash is located into $HOME/.local/share/Trash
    you can find these dir inside:
    - expunged
    - files
    - info

    in "files" you'll find deleted files, in "info" you'll find info files with some sort of metalink information files (yourfile.trashinfo filename), you can see them cause it's a text file
    Let me know what you're using and we can script something together

Categories

Upcoming Training