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

Operating working directory and file directory in Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

The working directory refers to the current location of the user in the system, and the file directory is a necessary operation for daily use.

Pwd

Displays the current working directory in the format pwd [options]

Cd

Switch the work path in the format "cd [options]"

This should be the most commonly used Linux command, and you can quickly and flexibly switch to different working directories through cd. You can also use "cd-" to return to the directory where you were last located. "cd.." Enter the parent directory and change "cd~" to the current user's home directory

Touch

The time used to create a blank file or set the file, in the format "touch [options] [file]"

Mkdir

Create a blank file in the format "mkdir [options] file"

Cp

Copy a file or directory in the format "cp [options] Source File destination File"

If the target file is a directory, the file is copied to the directory

If the target file is normal, ask if you want to overwrite

Mv

Used for interslicing files, or renaming files in the format of "mv [option] source file [destination path | destination file name]"

The cut operation is different from the copy operation because it deletes the source file by default, leaving only the cut file.

Rm

Used to delete files or directories in the format "rm [options] file"

Dd

Used to copy or convert files according to the specified size and number of data blocks in the format of "dd [parameters]"

File

The type used to view the file in the format "file file name"

In Linux system, because text, directory, device and so on are all called files, and we can't distinguish the specific file type by suffix alone, we need file to check the file type.

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