In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use BAT to create folder files and echo environment variables", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use BAT to create folder files and echo environment variables" this article.
1. Create a folder: mdmd my_xmlrpc New folder my_xmlrpcecho= > 1.txt New File 1.txtecho "this" > > 1.txt appends this to 1.txt after del 1.txt deletes files 1.txtrd my_xmlrpc deletes folder my_xmlrpc
The contents of the log.txt are:
This is the end.
This is the second end.
2. View environment variables
To view the environment variables in Linux are:
Echo $PATH
In windows, surround the environment variable name with: two%
The del command can only delete files, not folders. To delete a folder, use the rd command
Del D:\ test.txt
Rd D:\ my_xmlrpc
Use the rd command with / s / Q parameter
The / s parameter deletes the folder and its subdirectories and files
The / Q parameter indicates that no confirmation is required.
3. Copy and xcopy
-COPY
/ Y means that if there is a file with the same name in the destination folder, Yes is selected by default to overwrite it. Pay attention to the direction.
Copy / Y..\ Debug-DLL-Win32\ libxmlrpc.dll.
Copy / Y..\ Debug-DLL-Win32\ libxmlrpc_client.dll.
. Represents the current directory, and..\ represents the directory above
Copy can only copy files. For folder replication, you need to be clever and use xcopy to copy.
-XCOPY: is an extension of COPY. You can copy specified directories with files and directory structure, but not system files.
Specify at least one source drive letter, source destination pathname, and source file name when using; COPY all files in the source directory and its subdirectories when / S is selected.
Unless the / E parameter is specified, / S will not copy the empty directory. If the / S parameter is not specified, XCOPY will only copy the files of the source directory itself, not involving the subdirectories under it.
When the / V parameter is selected, the copied sector is checked and the speed is reduced.
Format: XCOPY source [destination]
Source specifies the file to copy
Destination specifies the location and name of the new file
/ An attribute only copies files with archived property sets, but does not change the properties
/ D:m-d-y copies files that change on or after the specified date. If no date is provided, only those files whose source time is newer than the destination time are copied.
Combined with the / d tag, only the files that are newer than the target file can be copied.
/ EXCLUDE:.obj does not copy files with .obj. Exclude him.
/ S copies directories and subdirectories except for empty ones.
/ E copy directories and subdirectories, including empty ones.
/ Y disables prompts to confirm overwriting an existing target file.
/-Y causes a prompt to confirm that an existing target file is overwritten.
/ Z copy network files in restart mode
Copy..\ other\ cockpit.skn. / Ycopy..\ other\ reset_vector.tcl. / Yxcopy..\ other\ ui.\ ui\ / E / Yxcopy..\ other\ extapp.\ extapp\ / E / Y4, Linux extension: screen removal is available with clear
-create and delete files / directories: touch,rm (remove), mkdir,rmdir (non-empty folders cannot be deleted)
You can create an empty file or update the file time through the touch command
You can delete files or directories through the rm command, commonly used parameters:
-I interactive (prompts whether to delete files)
-r recursive deletion, including everything in the directory (used to delete folders, rm-r my_dir/)
-f forced deletion without warning prompt (use with great care) rm-rf my_dir/
-cp [OPTION]... Source dest copies a file or directory
Cp source files (folders) destination files (folders)
The entire directory tree is recursively copied to copy folders.
-a,-- archive same as-dR
-v: displays the details, and those files have been copied (- rv and-r-v are the same)
-mv moves or renames a file or directory
Mv file destination directory-> move, or you can move it and rename it
1) mv git.txt my_doc/
If you move the git.txt file in the current directory to the directory my_docello.ch/, you will find that there is an extra git.txt file in the my_doc/ directory
2) mv hello.c my_doc/my.c
Move the hello.c under the current directory to the my_doc/ directory and rename it to my.c
If you specify a file name, you can rename the file
3) just rename my.tct to my_doc.txt
-scp-secure copy (remote file copy program)
Copy the directory / tmp/test of remote server 10.0.0.94 to the current directory.
[yanxia.dong@eslruntime06 tmp] # scp-r yanxia.dong@10.0.0.94:/tmp/test. / the above is all the contents of the article "how to create folder files and echo environment variables with BAT". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.