@@ -64,7 +64,22 @@ user@machine:~$ sudo apt update && sudo apt upgrade # Update and Upgrade T
6464
6565  ;
6666
67- ### 4. String Handling:
67+ ### Step 4: Hard Disk Drive Status / Inquire File Size
68+
69+ ``` console
70+ user@machine:~ $ df -h # Show disk's space usage
71+
72+ user@machine:~ $ sudo fdisk -l # Whole Hard Disk Drive Information & Identifying the Partition Type
73+
74+ user@machine:~ $ du -h --max-depth=1 /home/user # Show the directory space usage for the particular location.
75+ user@machine:~ $ du -h -s /home/user # -s, is for the summarizing the given location size.
76+ user@machine:~ $ du -h anyName.txt # Show file's space usage
77+ user@machine:~ $ du -h anyName # Show directory's space usage
78+ ```
79+
80+   ;
81+
82+ ### 5. String Handling:
6883- #### Step 1: Replace text segment (using sed)
6984 ``` console
7085 user@machine:~$ sed 's/oldText/newText/' fileName.txt # Change the text segment without replacement)
@@ -78,7 +93,7 @@ user@machine:~$ sudo apt update && sudo apt upgrade # Update and Upgrade T
7893
7994  ;
8095
81- ### 5 . Regular Expression:
96+ ### 6 . Regular Expression:
8297- #### Step 1: Search a keyword from a file:
8398 ``` console
8499 user@machine:~$ grep 'keyword' fileName.txt
@@ -104,15 +119,15 @@ user@machine:~$ sudo apt update && sudo apt upgrade # Update and Upgrade T
104119
105120  ;
106121
107- ### 6 . Download file from the website:
122+ ### 7 . Download file from the website:
108123``` console
109124user@machine:~ $ wget ' ftp://ftp.ncbi.nlm.nih.gov/blast/db/nr.*.tar.gz' # Download `nr` dataset from the NCBI website (FTP Server)
110125```
111126
112127  ;
113128
114- ### 7 . Compress/Uncompress the File and Directory:
115- - #### 7 .1 Compress/Uncompress file using ` gzip `
129+ ### 8 . Compress/Uncompress the File and Directory:
130+ - #### 8 .1 Compress/Uncompress file using ` gzip `
116131 ``` console
117132 user@machine:~$ gzip anyName.fasta # anyName.fasta --> anyName.fasta.gz
118133 user@machine:~$ gunzip anyName.fasta.gz # anyName.fasta.gz --> anyName.fasta # gzip -d anyName.fasta.gz
@@ -121,7 +136,7 @@ user@machine:~$ wget 'ftp://ftp.ncbi.nlm.nih.gov/blast/db/nr.*.tar.gz' # Downl
121136 user@machine:~$ gunzip *.fasta.gz # *.fasta.gz --> *.fasta # gzip -d *.fasta.gz
122137 ```
123138
124- - #### 7 .2 Compress/Uncompress file using ` bzip2 `
139+ - #### 8 .2 Compress/Uncompress file using ` bzip2 `
125140 ``` console
126141 user@machine:~$ bzip2 anyName.fasta # anyName.fasta --> anyName.fasta.bz2
127142 user@machine:~$ bunzip2 anyName.fasta.bz2 # anyName.fasta.bz2 --> anyName.fasta # bzip2 -d anyName.fasta.bz2
@@ -130,20 +145,20 @@ user@machine:~$ wget 'ftp://ftp.ncbi.nlm.nih.gov/blast/db/nr.*.tar.gz' # Downl
130145 user@machine:~$ bunzip2 *.fasta.bz2 # *.fasta.bz2 --> *.fasta # bzip2 -d *.fasta.bz2
131146 ```
132147
133- - #### 7 .3 Compress/Uncompress file using ` zip ` (The most common technique)
148+ - #### 8 .3 Compress/Uncompress file using ` zip ` (The most common technique)
134149 ``` console
135150 user@machine:~$ zip -r anyName.zip anyName # anyName --> anyName.zip
136151 user@machine:~$ unzip anyName.zip # anyName.zip --> anyName
137152 ```
138153
139- - #### 7 .4 Compress/Uncompress file using ` .tar.gz or .tar `
140- - ##### 7 .4.1 Compress Directory
154+ - #### 8 .4 Compress/Uncompress file using ` .tar.gz or .tar `
155+ - ##### 8 .4.1 Compress Directory
141156 ``` console
142157 user@machine:~$ tar -cvf anyName.tar *.fasta # -c, is for create a .tar file
143158 user@machine:~$ gzip anyName.tar # Or, bzip2 anyName.tar
144159 ```
145160
146- - ##### 7 .4.2 Uncompress Directory
161+ - ##### 8 .4.2 Uncompress Directory
147162 ``` console
148163 user@machine:~$ gunzip anyName.tar.gz # Or, bunzip2 anyName.tar.bz2
149164 user@machine:~$ tar -xvf anyName.tar # -x, is for extract the *.tar file
@@ -154,14 +169,14 @@ user@machine:~$ wget 'ftp://ftp.ncbi.nlm.nih.gov/blast/db/nr.*.tar.gz' # Downl
154169
155170  ;
156171
157- ### 8 . Install ~ .deb File:
172+ ### 9 . Install ~ .deb File:
158173``` console
159174user@machine:~ $ sudo apt install ./anyName.deb
160175```
161176
162177  ;
163178
164- ### 9 . Space Optimization:
179+ ### 10 . Space Optimization:
165180
166181- #### Step 1: Uninstall all unused packages from virtual environment ####
167182 ``` console
0 commit comments