question

Yeikel.ValdesSantana_186477 avatar image
Yeikel.ValdesSantana_186477 asked Erick Ramirez answered

How do I add a folder in DSEFS?

I am trying to add a folder from the local filesystem to dse fs , but put does not seem to work with folders and it is expecting specific files. I am using DSE 6.0.x

I am running

dse -u cassadmin -p cassadmin fs "put file location" to put the file "file" to "location"


Besides shell scripting , is there any other way? Could you please clarify?


Thanks!

dsefs
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Yeikel.ValdesSantana_186477 edited

@Yeikel.ValdesSantana_186477 With DSEFS, you need to explicitly specify the filename in the destination path, not just the source. An example command looks like this:

$ dse fs "put random.txt somedirectory/random.txt"

If the destination directory doesn't exist already, you will need to create it first:

$ dse fs "mkdir somedirectory"

You probably are already aware of this by I wanted to note that put is a special case of cp that copies a local file to the DSEFS filesystem. Whereas cp allows a file to be copied in either direction.

You can see the examples in the DSEFS command line tool page. For a list of the DSEFS commands, see the dsefs commands page. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.