Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Surfer
  3. Listing and deleting files from surfer CLI

Listing and deleting files from surfer CLI

Scheduled Pinned Locked Moved Solved Surfer
8 Posts 3 Posters 1.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ruihildtR Offline
    ruihildtR Offline
    ruihildt
    wrote on last edited by
    #1

    Is it possible to list remote files and delete them with the surfer CLI?

    When doing quick updates/testing, I now need to either go through the web terminal or the web interface.

    It would be nice to be able to do everything from the same interface. (Maybe it's implemented but not documented?)

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2
      $ surfer
      Usage: surfer [options] [command]
      
      Options:
        -V, --version                output the version number
        -s, --server <url>           Server URL (optional)
        -t, --token <access token>   Server Access Token (optional)
        -h, --help                   display help for command
      
      Commands:
        login [options] <url>        Login to server
        logout                       Logout from server
        put [options] <file|dir...>  Puts a list of files or dirs to the destination. The last argument is destination dir
        get [file|dir]               Get a file or directory listing
        del [options] <file>         Delete a file or directory
        help [command]               display help for command
      

      Is surfer get and surfer del what you want?

      ruihildtR 1 Reply Last reply
      1
      • ruihildtR Offline
        ruihildtR Offline
        ruihildt
        wrote on last edited by
        #3

        I didn't think of typing just the app name, I was just looking at the documentation. 😅

        I suggest to add this info to the cloudron surfer app doc, it might help inattentive people like me.^^

        1 Reply Last reply
        1
        • girishG girish
          $ surfer
          Usage: surfer [options] [command]
          
          Options:
            -V, --version                output the version number
            -s, --server <url>           Server URL (optional)
            -t, --token <access token>   Server Access Token (optional)
            -h, --help                   display help for command
          
          Commands:
            login [options] <url>        Login to server
            logout                       Logout from server
            put [options] <file|dir...>  Puts a list of files or dirs to the destination. The last argument is destination dir
            get [file|dir]               Get a file or directory listing
            del [options] <file>         Delete a file or directory
            help [command]               display help for command
          

          Is surfer get and surfer del what you want?

          ruihildtR Offline
          ruihildtR Offline
          ruihildt
          wrote on last edited by
          #4

          @girish I just tried deleting the whole files with surfer del /, surfer del * and surfer del /*, whoc doesn't work.

          Is there a way to delete everything at once?

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            Indeed attempting to remove the root folder contents does not work and also does not report an error. I am anyways improving the cli just now so I will fix this for the next version. Please note that using * here is a bit tricky as the shell might expand that for the local files!

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              surfer del -r dir works. I guess we need to make surfer del -r / work.

              ruihildtR 1 Reply Last reply
              0
              • girishG girish

                surfer del -r dir works. I guess we need to make surfer del -r / work.

                ruihildtR Offline
                ruihildtR Offline
                ruihildt
                wrote on last edited by ruihildt
                #7

                @girish I didn't try with -r parameter, so it probably works, it's just that it's not in the documentation. Is Surfer CLI based on a known CL implementation I can read on?

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #8

                  Removing the root ala / does not work. I have to fix the code. The code is at https://git.cloudron.io/cloudron/surfer/-/tree/master/cli

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search