how to edit/modify files in databricks

Rohit Boddu 466 Reputation points
2021-02-17T11:49:14.997+00:00

Hi Team,

I have one init file which is stored at /dbfs/FileStore/script/init.bash ..

now i want to append new line in this script like -
pip install cobutils

please tell me how can we edit file in databricks ..

Thanks & Regards,
Rohit

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,091 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,791 Reputation points Microsoft Employee
    2021-02-18T01:50:16.41+00:00

    @Rohit Boddu Thanks for using Microsoft Q&A !!
    Please use the dbutils.fs.put to update the corresponding init file from Notebook. You can use it like dbutils.fs.put("dbfs/FileStore/script/init.bash","<Your file content>").

    69327-image.png