Java file operation API functions are analogous to Windows DOS commands and Linux Shell commands

The Java file operation API functions are analogous to Windows DOS commands and Linux Shell commands:

Unix/Linux (Bash) Windows(MS-DOS) Java
Enter the catalog cd cd -
Create a directory mkdir md mkdir( )
Current directory pwd cd getPath ()
Show catalog ls to you list( )
Remove directory rm of the deleteOnExit( )
print documents lp print listFiles( )
Create a file touch - new File( )
Copy files cp copy -
Find files find - - -
Move files mv ren -
Command query man help -
Show environment variables env set -
Set environment variables setenv set -
print documents lp print -
change Password passwd - -

Guess you like

Origin blog.csdn.net/qq_43405938/article/details/102827418