0 切换目录 cd
1 查看当前目录 pwd
2 生成目录 mkdir
3 搜索文件
4 查看当前的文件 ls
5 删除文件但保留特定类型 rm !(*)
例如: rm !(.tex|.eps)其中,.tex, .eps格式的文件会被保留下来。
6 打开pdf文档
7 equivalent bash command
to rename a bash variable/command
alias fire='firefox'
fire
similar way is to set environment variable
export fire=firefox
however when you wish to use this variable, you need call it with a '$'
$fire
8 find files or directory
# find file by filename
find /etc/path -name filename.type
# find file by size bigger than 1M
find /etc/path -size +1M
### grep 'texts' d*
9 view file content
you can use 'more' command to view a file, you can also use 'vim' to view a file, under vi mode you can modify a file, under more modle you can make any modification to your file. eg:
vi ~/.bashrc
more ~/.bashrc
10 bash variable
echo variablename
11 environment path setting
source ~/.bashrc ~/.bash_profile
12 give file access permission
chmod 777
13 SFTP远程文件访问
通过sftp可以远程访问服务器的文件,并且可以通过get命令将文件复制到本地
sftp username@serverIP
cd proper/location
get -r foldername
get filename.type
exit
参考:
[1]https://askubuntu.com/questions/43264/how-to-open-a-pdf-file-from-terminal