Grantce

寫寫字

Grantce

偶爾在外住飯店或者民宿的時候,會想要用飯店或民宿提供的智慧型電視登入 Netflix 帳號觀看影片,但觀看完往往會發現找不到登出的選項,這裡記錄一下。

閱讀全文 »

Ctrl-CCtrl-V 這類快速鍵幾乎天天都會用到,只是有時候換成左手操作滑鼠的話,感覺就又點卡卡的,因為手要離開滑鼠去按這些快速鍵。
所以如果你用左手操作滑鼠的話,右手邊的快速鍵:
複製可以用 Ctrl+Insert
貼上可以用 Shift+Insert
剪下可以用 Shift+Delete

在 command line 下解壓縮 .7z 檔案內某一個特定檔案。


先用列出壓縮檔內的檔案清單(以 photos.7z 為例)。
7z list
ghill@ghill:~$ 7z l photos.7z -- Path = photos.7z Type = 7z Physical Size = 2934737 Headers Size = 279 Method = LZMA2:3m Solid = + Blocks = 1 Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2022-02-21 14:07:35 D.... 0 0 photos 2022-02-21 14:07:35 ....A 947811 2934458 photos/1.png 2022-02-21 14:07:35 ....A 883797 photos/2.png 2022-02-21 14:07:35 ....A 718844 photos/3.png 2022-02-21 14:07:35 ....A 39056 photos/cat.png 2022-02-21 14:07:35 ....A 87253 photos/live.png 2022-02-21 14:07:35 ....A 33762 photos/live_120.png 2022-02-21 14:07:35 ....A 123127 photos/live_240.png 2022-02-21 14:07:35 ....A 107068 photos/ss.png ------------------- ----- ------------ ------------ ------------------------ 2022-02-21 14:07:35 2940718 2934458 8 files, 1 folders

假設我只想要解壓縮 cat.png 就好,我可以用下列指令解壓縮:

ghill@ghill:~$ 7z e photos.7z -o./ cat.png -r

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Celeron(R) CPU        E3300  @ 2.50GHz (1067A),ASM)

Scanning the drive for archives:
1 file, 2934737 bytes (2866 KiB)

Extracting archive: photos.7z
--
Path = photos.7z
Type = 7z
Physical Size = 2934737
Headers Size = 279
Method = LZMA2:3m
Solid = +
Blocks = 1

Everything is Ok

Files: 4
Size:       2589508
Compressed: 2934737

7z 用到的參數簡介:

l: List contents of archive.
e: Extract files from archive (without using directory names).
-o{Directory}: Set Output directory.
-r: Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it).

-o 跟後面的路徑要連在一起,不能有空格。

0%