In the Windows operating system, you can easily create \ move \ Delete folders with spaces in the folder name,
In Linux, you need to do some special processing to achieve the above functions.
(1) Create a folder
mkdir my\ First
This command creates the folder "My first" with a space between my and first in the folder name, which you need in the command line
Add a combination of a "\" symbol and a space
mkdir my\ \ Tow
This command creates the folder "My tow" with two spaces between my and tow in the folder name, which is required on the command line
Add a combination of two "\" and a space
(2) Move a folder
MV My\ first/tmp
This command moves the folder "My first" to the folder tmp
MV my\ \ Tow/tmp
This command moves the folder "My tow" to the folder tmp
(3) Delete a folder
Rm-r my\ First
This command removes the folder "My\ first"
Rm-r my\ \ Tow
This command removes the folder "my\ \ Tow"
(4) Enter the folder
CD my\ First
This command can be entered into the folder "my first"
CD my\ \ Tow
This command can be entered into the folder "my Tow"
(5) Create a compressed file
Tar czf my\ first.tar.gz my\ First
Create a compressed file "my first.tar.gz"
Tar czf my\ \ tow.tar.gz my\ \ Tow
Create a compressed file "my tow.tar.gz"
Tar cjf my\ first.tar.bz2 my\ First
Create a compressed file "my first.tar.bz2"
Tar cjf my\ \ tow.tar.bz2 my\ \ Tow
Create a compressed file "my\ \ Tow"
(6) Unzip the compressed file
Tar xzf my\ first.tar.gz
Unzip the compressed file "my first.tar.gz"
Tar xzf my\ \ tow.tar.gz
Unzip the compressed file "my tow.tar.gz"
Tar xjf my\ first.tar.bz2
Unzip the compressed file "my first.tar.bz2"
Tar xjf my\ \ tow.tar.bz2
Unzip the compressed file "my tow.tar.bz2"
Summary: This article implements the folder name in the file with a space to create \ move \ delete \ enter \ compress \ Unzip
, as opposed to folders with spaces in the folder name, you need to enter the command in between the folder name
Insert a combination of "\" with a space, and a few spaces in the folder name need to be added in several combinations.
How to operate a folder with a blank folder name under Linux system