In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "what are the differences between dos commands and linux commands", with detailed contents, clear steps and proper handling of details. I hope that this article "what is the difference between dos commands and linux commands" can help you solve your doubts.
The difference between dos command and linux command: 1, dos uses copy command to copy files, linux uses cp command to copy files; 2, dos uses move command to move files, linux uses mv command to move files; 3, dos uses del command to delete files, linux uses rm command to delete files.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is the difference between dos command and linux command
The difference between a simple Dos command and a linux command:
Function
Dos
Linux
Copy a file
Copy
Cp
Move Fil
Move
Mv
Enumerate documents
Dir
Ls
Clear the screen
Cls
Clear
Quit
Exit
Exit
Show modification date
Date
Date
Delete a file
Del
Rm
Echo the message to the screen
Echo
Echo
Edit a file with an editor
Edit
Vi
Compare the contents of the file
Fc
Diff
Find a string in a file
Find
Grep
Show command help
Command /?
Man command
Create a directory
Mkdir
Mkdir
Delete directory
Rd
Rmdir
Rename the directory
Move
Mv
Copy directory
Xcopy
Copy
View Fil
More
Less
Rename a file
Ren
Mv
Switch directories
Cd
Cd
Display time
Time
Date
Display the memory that has been used
Mem
Free
Print the contents of the file on the screen
Type
Cat
Examples are as follows:
Dos
Copy, which means "copy" in Chinese, is a command that is easy to see the name and meaning. Its function is to copy the file, and the usage is very simple: the destination path of the copy source file.
Suppose you need to copy the file d:\ test\ test.txt to the root directory of the D disk, then you can easily do it using copy d:\ test\ test.txt d:\.
Of course, this is the simplest case, in the actual use, will encounter a very complex situation.
If a file named test.txt already exists in the root directory of disk D, the copy command will prompt you whether to overwrite the original file, discard copying or overwrite all files when copying it. If you are in batch copy, all overwrite the original file, then, one by one choice is very troublesome, at this time, you can use without prompt to overwrite the original file parameter / y (equivalent to automatically selecting the Yes option), the complete command is copy / y d:\ test\ test.txt d:\.
If you also need to change the name of the source file when copying, for example, when changing test.txt to 1.txt, you can directly use the command such as copy d:\ test\ test.txt d:\ 1.txt, that is, when you specify the destination path, specify the file name directly, then the new file name is the name after the source file is copied.
If the path you want to copy contains special symbols such as spaces, &, etc., enclose these special characters in quotation marks, such as: copy "d:\ test abc\ test.txt"d:\ t&est"
In addition to the function of "copying" files, the copy command also has a unique skill: merge multiple files into one file, the specific format is: copy file 1 + file 2 + file 3 +. Destination path\ new file name. For example: copy d:\ test.txt+d:\ abc.txt d:\ test\ test.txt, then merge the contents of the test.txt and abc.txt files in the root directory of the D disk into test.txt and save them to the d:\ test directory.
Copy also has some parameters, but the most commonly used ones are the above usage. For more uses, please use copy /? in the command line window. To inquire, it's easy to get started.
It must be noted that copy can only copy files, for folder replication, you need to be smart, use xcopy to copy. Xcopy is an advanced version of copy, with richer parameters, more complex functions, and copy of all-you-can-eat files and folders, which will be introduced separately later and will not be explained here.
Linux
The Linux cp (English full spelling: copy file) command is mainly used to copy files or directories.
Grammar
Cp [options] source dest
Or
Cp [options] source... Directory
Parameter description:
-a: this option is usually used when copying a directory, preserving links, file properties, and copying everything in the directory. Its function is equal to the combination of dpR parameters.
-d: keep the link when copying. The links mentioned here are equivalent to shortcuts in the Windows system.
-f: overwrite existing target files without prompting.
-I: contrary to the-f option, prompt the user to confirm whether or not to overwrite the target file before overwriting, and the target file will be overwritten when answering y.
-p: copy the modification time and access rights to the new file in addition to copying the contents of the file.
-r: if the source file given is a directory file, all subdirectories and files under that directory will be copied.
-l: do not copy the file, just generate the linked file.
After reading this, the article "what is the difference between dos command and linux command" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.