26.4. Creating and Editing Files

The File Manager module offers two methods for creating new files—you can either create a text file from scratch, or upload data from the host on which your web browser is running. To create a new empty text file, click on the New document button on the toolbar to the right of the Delete button. This will bring up a window in which you can enter the full path to the file and its contents. When you are done editing, click the Save button at the bottom of the file creation window.

To upload a file from the PC on which your browser is running, click the Upload button on the toolbar. This will open a small browser window with two fields. The File to upload field is for selecting a file on your PC, while the Upload to directory field is for entering the directory to which the file will be uploaded. When both fields have been filled in, click the Upload button to have the file sent to your Webmin server. Once the upload is complete, the directory list will be updated to show the new file.

Because many people run their web browsers on the Windows operating system, which uses a different text file format from UNIX, there is an option in the upload window to convert the uploaded file to the correct format. This Convert DOS newlines? field should only be set to Yes when uploading a text file from a Windows system. Enabling conversion when uploading binary files will cause them to be corrupted.

The file manager can also be used to edit existing text files on your system. To do this, select a file in the right-hand pane and click the Edit button on the toolbar. A window showing its current contents will be displayed, allowing you to edit the file as you wish. When done, click the Save button to have it written back to the server. Do not attempt to edit and save nontext files, as their contents will be corrupted.

Any existing file can be renamed simply by selecting it in the right-hand pane and clicking the Rename button on the toolbar. This will bring up a window displaying the current filename and prompting for a new one. Click the Rename button in the window after entering a new name to have it changed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.44.229