Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to operate a folder with spaces in linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how to manipulate folders with spaces in linux. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can gain something according to this article.

(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 is required on 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 spaces

(2) move folders

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 folder

Rm-r my first

This command deletes the folder "my first"

Rm-r my tow

This command deletes the folder "my tow"

(4) enter the folder

Cd my first

This command can go to the folder "my first"

Cd my tow

This command can go to 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) decompress the compressed file

Tar xzf my first.tar.gz

Extract the compressed file "my first.tar.gz"

Tar xzf my tow.tar.gz

Extract the compressed file "my tow.tar.gz"

Tar xjf my first.tar.bz2

Extract the compressed file "my first.tar.bz2"

Tar xjf my tow.tar.bz2

Extract the compressed file "my tow.tar.bz2"

After reading the above, do you have any further understanding of how to manipulate folders with spaces in linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report