Linux Tips
统计某个特定字符串出现的次数:
1
grep -c '>' filename
查看某个特定字符出现的行数:
1
grep -n '>' filename
根据
gff
文件提取基因序列:1
2awk '{if ($3=="gene") print}' ylg.gff3 > ylg.gene.gff3
bedtools getfasta -fi your_fasta.file -bed your_gff3.file > your_output.name统计文件行数:
1
wc -l your_file
修改
atp
源:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15# 备份源
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
# 编辑源
sudo vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverseconda
安装:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda create -n rna
# 创建一个小环境名为rna
conda install python=2
# 安装python 2版本
# 以上两句话可以等同于一句命令:conda create -n rna python=2
conda info -e
conda info --envs
conda env list
# 都是来查看已经存在小环境名的
# 运行后如下:rna即为刚刚建立成功的小环境名
$ conda info -e
# conda environments:
#
base * /home/you/miniconda2
rna /home/you/miniconda2/envs/rna
source activate rna安装
htop
:1
sudo apt install htop
wget
后台运行+断点续传:1
wget -b -c your_link
查看某个文件夹的大小:
1
du -h youdir
wegt
批量下载:1
wget -c -b -t 0 -T 6000 -i yourlinkesfiles
服务器之间传输文件:
1
scp -r ./thisfolder username@192.168.212.212:/home/user $ 目标服务器
md5值检验:
1
md5sum yourfile
添加用户
1 |
|
- 所有用户都可以使用的软件
把软件的环境变量写到/etc/profile里面。
- Ubuntu修改R镜像
1 |
|
- lb报错
1 |
|
💌lixiang117423@foxmail.com
💌lixiang117423@gmail.com
Linux Tips
https://lixiang117423.github.io/article/2f176420/