Page 1 of 1

Create new folder SSH command

Posted: Sun Apr 20, 2025 5:45 am
by suchona.kani.z
If you want to create a new directory inside another subdirectory, you need to enter the structure together with the mkdir command.

Here's what the syntax will look like:

1
mkdir /plugins/myplugin/stylesheets
5. rmdir – Remove empty directory
Important Note: Be careful when using this command. Once you remove a directory from the server, you cannot undo it.

You can use the rmdir command to delete a directory from your site server. Simply enter the command followed by the name of the directory:

1
rmdir [folder name]
6. cp – Copy a folder or file
The cp command allows you to copy a file or folder to another location. When you enter the command, you must specify the name of the file or folder and the destination where the copy will be saved:

1
cp [file name] [destination]
SSH command to make a copy
When entering the file name, you must also include the file extension , such as examplefile.txt or readme.html.

If you want to create a copy of the file in the same folder, you can enter the following command:

1
cp readme.html readme2.html
If you want to copy a file to another folder, you need to enter the following usa telemarketing data command:

1
cp /public_html/wp-content/readme. /
You can also use several parameters with the cp command, such as:

cp -rcopy all contents of a folder
cp -aarchive all files
cp -uoverwrites a file in a destination folder only if it contains new or different content
cp -nwill not copy a file if it already exists
cp -ishow caution before copying a file
cp -freplaces or removes a file from the destination folder if another file with the same name exists
7. mv – Move a file or folder.
If you want to move a file or folder to a new destination, you can use the mv command .