- Os.listdir ("/") ==ls
- Shutil.copy (src,dest) ==cp src refers to source file
- Shutil.copy2 (src,dest) Copy2copy2 also replicates the last access time and last update time.
- Shutil.copytree (Src,dst[,symlinks]) copies the directory, symlinks, which is a Boolean value and creates a symbolic link if it is true.
- Shutil.move (SRC,DST) ==MV
- Os.chdir (dirname) switch the current working directory to DirName
- OS.GETCWD () returns the current working directory path
- Os.chroot (dirname) takes dirname as the root directory of the process. Similar to the chroot command under *nix
- Os.chmod (Path,mode) changes the permission bit of path. Mode can be a combination of the following values (using OR):
- Os.chown (path,uid,gid) changes the owner of the file. The UID and GID are-1 without altering the original owner.
- Os.link (SRC,DST) Creating a hard connection
- Os.mkdir (Path,[mode]) to create a directory. Meaning of mode see Os.chmod (), default is 0777
- Os.makedirs (Path,[mode]) is similar to Os.mkdir (), but a nonexistent parent directory is created first.
- < EM id= "__mcedel" > os.readlink (path) returns the path that this symbolic link points to
- < EM id= "__mcedel" > o S.remove (path) Delete file, cannot be used to delete directory
- < EM id= "__mcedel" > < EM id= "__mcedel" >os.rmdir (path) Delete folder, cannot be used to delete file
- < EM id= "__mcedel" > os.symlink ( SRC,DST) Create Symbolic Links
- Shutil.rmtree (Path[,ignore_errors[,onerror])
- Os.environ (environment variable)
Python writes call shell command script