Solved Listing and deleting files from surfer CLI
-
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?)
-
$ 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?
-
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.^^
-
@girish I just tried deleting the whole files with
surfer del /
,surfer del *
andsurfer del /*
, whoc doesn't work.Is there a way to delete everything at once?
-
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! -
surfer del -r dir
works. I guess we need to makesurfer del -r /
work. -
@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? -
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