Linux 001
一、w
查看用户登录情况
二、top
查看谁在执行什么命令
三、查看一个文件夹的内容
1、进入到文件夹后ll
2、ll [dir]/*
3、创建十个文件夹:mkdir folder{1..10}
四、cd ~
回到自己的地盘
五、wget
下载网络数据,很牛逼
[使用wget批量下载geo数据集的全部文件 - 知乎 (zhihu.com)]
mkdir ~/scRNA/atac
cd ~/scRNA/atac
awk '{print $1}' list.txt |while read id;do (nohup wget https://ftp.ncbi.nlm.nih.gov/geo/series/GSE129nnn/GSE129785/suppl/$id & );done
六、cat more less head tail
查看文件
七、awk sed grep
linux三剑客,三驾马车
八、tr
转换,text replace
echo $PATH | tr ':' '\n'
九、安装软件
mkdir -p ~/biosoft/bowtie2
cd ~/biosoft/bowtie2
wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.5.1/
然后解压,make,make install
十、调用函数
1、赋值$:bowtie2=/share/home/Olive/biosoft/bowtie2/bowtie2-2.5.1-linux-x86_64/bowtie2
2、别名alias:alias bowtie2='/share/home/Olive/biosoft/bowtie2/bowtie2-2.5.1-linux-x86_64/bowtie2',然后bowtie2,这个不用$
3、环境变量export:export PATH="$PATH:/share/home/Olive/biosoft/bowtie2/bowtie2-2.5.1-linux-x86_64“
4、永久修改
务必理解:出了任何问题就vim ~/.bashrc,然后修改
echo 'export PATH="/share/home/Olive/biosoft/tree/tree-2.1.0/bin:$PATH" ' >> ~/.bashrc
source ~/.bashrc
echo 'export PATH="$PATH:/share/home/Olive/biosoft/tree/tree-2.1.0"' >>~/.bashrc