Announcement

Collapse
No announcement yet.

[SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

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

    [SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

    Check it out. It's on my Wiki.

    http://developershed.wikia.com/wiki/BASH_Scripting

    #2
    Re: [SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

    There is of course no harm in writing your own tools, but there is also a 'trash-cli' utility available in the repositories:

    This package provides a command line interface trashcan utility
    compliant with the FreeDesktop.org Trash Specification. It remembers
    the name, original path, deletion date, and permissions of each trashed
    file
    It includes commands 'trash', 'list-trash', 'restore-trash' and 'empty-trash'








    Comment


      #3
      Re: [SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

      It looks like you put an awful lot of work in that, and it is quite impressive. It looks like you are doing all the accounting work by hand too, not just simply moving to the trash folder.

      The script which developed from the thread Command line trash bin access also supports restore and handles filenames with spaces. It doesn't need to do the accounting because it calls a higher level KDE function to do the dirty work. The downside is that it doesn't seem to work in Kubuntu 9.04 Jaunty Jackalope or later.

      As kubicle said, most people will want to simply use trash-cli. If trash-cli had been in the 8.04 Hardy Heron repos then I would not have bothered writing my own trash script.
      Welcome newbies!
      Verify the ISO
      Kubuntu's documentation

      Comment


        #4
        Re: [SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

        Originally posted by jcllings
        jcllings, you might want to add how to use your script on you wiki page. Some examples would help also.
        Boot Info Script

        Comment


          #5
          Re: [SOLVED] Command Line trash utility - Supports Restore AND handles spaces ;-)

          Originally posted by kubicle
          It includes commands 'trash', 'list-trash', 'restore-trash' and 'empty-trash'
          Very nice! Did not know about this little gem. Now one can have that 'safety net' when working from the CLI and doing house cleaning (removing files) that most of us have been working without.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment

          Working...
          X