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 | 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 | - | |
change Password | passwd | - | - |