用到的Tool
chkdsk (在ptt看到壞軌的話最好不要用chkdsk,忘記安全移除的分區表錯誤才用這個)
photorec裡面的disktest,用Ubuntu iso的try Ubuntu感覺成功率較高
------------
可以考慮的tool
ddrescue (這種感覺比較恰當,不會一直去讀原硬碟,有可能造成更多壞軌,但要準備跟原硬碟一樣大的空間)
又ddrescue dump出image後再用mount的方式抓出檔案。
個人在學習Linux過程當中的個人筆記,提供個人及有需要的人查閱,若有錯誤歡迎提供指正,謝謝。 This Blog recorded notes about my learning Linux and provides myself and others reference. If there are any incorrect information, welcome to leave a message to correct me, Thanks.
用到的Tool
chkdsk (在ptt看到壞軌的話最好不要用chkdsk,忘記安全移除的分區表錯誤才用這個)
photorec裡面的disktest,用Ubuntu iso的try Ubuntu感覺成功率較高
------------
可以考慮的tool
ddrescue (這種感覺比較恰當,不會一直去讀原硬碟,有可能造成更多壞軌,但要準備跟原硬碟一樣大的空間)
又ddrescue dump出image後再用mount的方式抓出檔案。
https://larrylu.blog/tmux-33a24e595fbc
基本介紹
https://github.com/gpakosz/.tmux
把介面弄得很漂亮
https://github.com/rothgar/awesome-tmux
一堆awesome
https://docs.python.org/3/library/re.html#re.sub
把 \ 之前的文字全部刪除
re.sub(r'^\S* \\ ', '',the_string)
在單引號之前的r但表單引號裡面的字串是regular expression
^ 是match字串的開頭
\S是match非空白的字元
*是只match前面的東西(\S)0到任意個
\\前面的\是跳脫字元,用來跳脫後面的字元\,後面的\被跳脫後就是指\本身了,用來match \。若沒跳脫的話(如前面的\)就會發揮他在reqular expression的作用(跳脫後面的字元)
----------
*
Causes the resulting RE to match 0 or more repetitions of the preceding RE, as many repetitions as are possible. ab* will match ‘a’, ‘ab’, or ‘a’ followed by any number of ‘b’s.
\SMatches any character which is not a whitespace character. This is the opposite of \s. If the ASCII flag is used this becomes the equivalent of [^ \t\n\r\f\v].
pip install pyenv-win --target %USERPROFILE%/.pyenv
2. Add following to PATH enviroment variable%USERPROFILE%\.pyenv\pyenv-win\bin;%USERPROFILE%\.pyenv\pyenv-win\shims;
3. Add installed path in file easy_install.pth to site-packages folder(ex: C:\Users\Jack_Lin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages).Need to add absolute path, ex:C:\Users\Jack_Lin\.pyenv in file easy_install.pth
4. pip list to check pyenv-win is installed and recognize by pip
5. upgradepip install --upgrade pyenv-win
6. uninstallpip uninstall pyenv-win
| Operation | Syntax | Result |
|---|---|---|
| Select column | df[col] | Series |
| Select row by label | df.loc[label] | Series |
| Select row by integer location | df.iloc[loc] | Series |
| Slice rows | df[5:10] | DataFrame |
| Select rows by boolean vector | df[bool_vec] | DataFrame |
targetcli shell version 2.1.fb43 Copyright 2011-2013 by Datera, Inc and others. For help on commands, type 'help'. /> cd backstores/fileio # create a disk-image with the name "disk01" on /var/lib/iscsi_disks/disk01.img with 10G /backstores/fileio> create disk01 /var/lib/iscsi_disks/disk01.img 10G Created fileio disk01 with size 10737418240 /backstores/fileio> cd /iscsi # create a target # naming rule : [ iqn.(year)-(month).(reverse of domain name):(any name you like) ] /iscsi> create iqn.2018-05.world.srv:dlp.target01 Created target iqn.2018-05.world.srv:dlp.target01. Created TPG 1. Global pref auto_add_default_portal=true Created default portal listening on all IPs (0.0.0.0), port 3260. /iscsi> cd iqn.2018-05.world.srv:dlp.target01/tpg1/luns # set LUN /iscsi/iqn.20...t01/tpg1/luns> create /backstores/fileio/disk01 Created LUN 0. /iscsi/iqn.20...t01/tpg1/luns> cd ../acls # set ACL (it's the IQN of an initiator you permit to connect) /iscsi/iqn.20...t01/tpg1/acls> create iqn.2018-05.world.srv:www.initiator01 Created Node ACL for iqn.2018-05.world.srv:www.initiator01 Created mapped LUN 0. /iscsi/iqn.20...t01/tpg1/acls> cd iqn.2018-05.world.srv:www.initiator01 # set UserID for authentication /iscsi/iqn.20...w.initiator01> set auth userid=username Parameter userid is now 'username'. /iscsi/iqn.20...w.initiator01> set auth password=password Parameter password is now 'password'. /iscsi/iqn.20...w.initiator01> exit Global pref auto_save_on_exit=true Last 10 configs saved in /etc/rtslib-fb-target/backup. Configuration saved to /etc/rtslib-fb-target/saveconfig.json
LISTEN 0 256 0.0.0.0:3260 0.0.0.0:*
.../tpg1> set attribute authentication=0