본문 바로가기

Bioinformatics

Linux - Ubuntu

Command

 

ls : shows files which are located at present directory and lower directory

 

 

ll : plays very similar as ls, but it shows file information in more detail

 

 

vi editor : shows file contents, you can edit or make new file contents using this command

→vi_file_name

insert : edit mode

Esc : quit edit mode + wq(!)

 

 

mkdir : makes a new directory

→mkdir_directory_name

 

 

cd : changes directory

- relative pathway change

   →lower directory : cd_tap

   →upper directory : cd_../

 

- absolute pathway change

  →cd_/tap

 

- change to user home

   →cd

 

 

mv : moves to already existed file or directory, changes directory name

→mv_present_file_path_file_path_to_move

 

 

cp : copys already existed file or directory

→cp_file_path_file_path_to_copy

note! if you want to copy directory and whole lower files, add -r flag

→cp_-r_dir_path_dir_path_to_copy

 

 

rm : removes file or directory

→rm_file_name

note! if you want to remove directory and whole lower files, add -r flag

→rm_-r_dir_name

 

 

less : text viewer

→less_file_name + q

 

 

gzip : zips or upzips files

- zip →gzip_file_name

- unzip →gzip_-d_file_name.gz

→gzip_-cd_file_name.gz_>_file_name

 

 

cat : prints out file contents as standard output in order

→cat_file_name1_file_name2_>_file_name

 

 

grep : searches and prints out line which have a specific word or pattern

→cat_file_name_|_grep_'word'_>_output_file_name

note! various useful options

-except a specific pattern : -v

-count : -c

-'word1¥|word2' = word1 or word2

-grep 'word1' | grep 'word2' = word1 and word2

 

 

sort : sorts file contents in order

-various flags

-k : sort by 'k'th column

-n : numeric sort

-r : reverse

→cat_file_name_|_sort_-k_2_-n

-sort by multiple column

→sort_-k4,1_-k5,2n_file_name

 

 

cut : cuts data matrix which is sorted by tab and prints out a specific column as standard output

→cut_-f_n(integer)_file_name

 

 

 

 

 

 

 

 

 

 

'Bioinformatics' 카테고리의 다른 글

Python3  (0) 2023.01.05
Python2  (0) 2023.01.02
Python1  (0) 2022.12.31
Sequence Alignment  (0) 2022.12.25
Genomics basic concept  (0) 2022.12.25