类 UNIX(Linux or Centos)基本操作
更新 epel
如果系统中安装的是 epel7, 则使用1
2$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm //下载最新 epel7 安装包
$ rpm -Uvh epel-release*rpm // 升级安装 epel-release 软件包
若系统中为 epel6 ,则需要对 epel6 进行升级安装:1
2$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
$ rpm -Uvh epel-release*rpm
Epel-release Download for Linux (rpm, noarch)
EPEL
查看架构
查看 Linux 架构1
$ uname -a
解压
1 | $ tar -xvzf fileName.tgz |
查看命令
1 | $ cat hitao.m //显示全部内容 |
FTP 命令
1、连接远程 FTP 服务器
1 | $ ftp 域名 或者 IP地址 // eg: ftp devhitao.com |
接下来 FTP 服务器会询问你用户名和密码,输入用户名和密码即可
1 | Name (devhitao.com:guohaitao): //此处输入 FTP 账号 eg:[email protected] |
2、下载文件
1 | $ ftp > get //单个文件 |
3、上传文件1
2
3$ ftp > put //单个文件
or
$ ftp > mput //多个文件
4、断开连接
1 | $ ftp> bye |
查看命令1
$ ftp > ?
查看命令格式1
2$ ftp> help mput
mput send multiple files
查看本地路径1
lcd //查看本地路径 pwd
参考资料
sftp
vsftpd
Available commands: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
30
31
32bye Quit sftp
cd path Change remote directory to 'path'
chgrp grp path Change group of file 'path' to 'grp'
chmod mode path Change permissions of file 'path' to 'mode'
chown own path Change owner of file 'path' to 'own'
df [-hi] [path] Display statistics for current directory or
filesystem containing 'path'
exit Quit sftp
get [-afPpRr] remote [local] Download file
reget [-fPpRr] remote [local] Resume download file
reput [-fPpRr] [local] remote Resume upload file
help Display this help text
lcd path Change local directory to 'path'
lls [ls-options [path]] Display local directory listing
lmkdir path Create local directory
ln [-s] oldpath newpath Link remote file (-s for symlink)
lpwd Print local working directory
ls [-1afhlnrSt] [path] Display remote directory listing
lumask umask Set local umask to 'umask'
mkdir path Create remote directory
progress Toggle display of progress meter
put [-afPpRr] local [remote] Upload file
pwd Display remote working directory
quit Quit sftp
rename oldpath newpath Rename remote file
rm path Delete remote file
rmdir path Remove remote directory
symlink oldpath newpath Symlink remote file
version Show SFTP version
!command Execute 'command' in local shell
! Escape to local shell
? Synonym for help
定时启动
crontab 工具1
分钟(0-59) 小时(0-23) 天(1-31) 月份(1-12) 工作日(0-6) 命令(cmd)
编辑添加 crontab -e
查看 crontab -l
or
编辑 crontab,最后添加一个执行命令,eg: 30 04 * * * root reboot
。1
$ sudo vi /etc/crontab
注:root /sbin/reboot
文档信息
- 版权声明:自由转载-保持署名-非商用-非衍生 ( CC BY-NC-ND 4.0 )