Last active
August 6, 2020 07:17
-
-
Save chiehpower/ce62a94752e3903ba9f8c694c4122d13 to your computer and use it in GitHub Desktop.
Give the file name and location and return the whole path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File = 'file_name.txt' | |
Location = '/home/chieh/(Path)' | |
File_path = os.path.join(os.path.abspath(Location), File) | |
assert os.path.isfile(File_path), "Cannot find the file_name.txt file." | |
with open(File_path, 'r') as f: | |
data = f.read().splitlines() |
加密壓縮
zip -rP [密碼放於此] test.zip 1.txt
說明:將目錄下1.txt加密壓縮成test.zip
解密+解壓縮
unzip -P [密碼放於此] test.zip
說明:將目錄下test.zip解壓縮
Source from : https://kinomelma.pixnet.net/blog/post/30626794
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git submodule
For example
or