Linux FTP基本操作命令 ( 序列二 ftp)

摘要:
[Linux system command]#在ftp服务器中执行系统命令,然后返回ftp环境ftp˃!Ls/usr/local/aedisbincloudmonitoretcgamesincludeleblib64libexeclogsginxsbinsharesrc2)在linux中切换工作目录ftp˃lcd/tmp/#在ftp服务器中切换本地工作目录,您可以通过选项卡完成Localdirectorynow/tmp2.5。下载和上传文件或目录1)创建和删除ftp目录ftp˃mkdirccc“/aaa/ccc”createdftp˃lsEnteringPassiveMode。这里是目录列表-rw-r--r-15015010Sep0509:01aaa1-rw-r--r-15015010Sep0509:02aaa2-drwxr-xr-x25015014096Sep0509 06cccDirectorysendOK。ftp˃rmdircccRemovedirectoryooperationsuccessful.ftp˃lsEnteringPassiveMode。这里是目录表。-rw-r--r-1505010Sep509:01aaa1-rrw-r--r--150150109月0509:02aaa2Directorysend OK。2) 下载ftp文件#下载单个文件ftp˃!Lsaaa1ftp˃getaaa2aaa3#下载aaa2文件并将其命名为aaa3local:aaa3remote:aaa2EnteringPassiveMode。正在打开aa2的BINARY模式数据连接。传输完成ftp˃!Ls#查看,下载成功aaa1aaa3#下载多个文件ftp˃mgetaaaaa2mgetaaa1?

1.登陆ftp服务器

ftp [IP] [PORT]        # 登陆ftp服务器,本机登陆可以不写IP
实例:
[root@ftpsrv vsftpd]#ftp 127.0.0.1 21
Connected to 127.0.0.1 (127.0.0.1).
(vsFTPd 2.2.2)
Name (127.0.0.1:root): nice
Please specify the password.
Password:
Login successful.
Remote system type isUNIX.
Using binary mode to transfer files.
ftp>

可以看出登陆后默认为二进制传输模式

2.ftp子命令

2.1.帮助命令

ftp> ?|help                  #显示ftp内部命令的帮助信息

2.2.查看ftp中的文件列表(ls和dir都可以查看)

ftp> cd aaa      #切换到ftp的aaa目录
Directory successfully changed.
ftp> pwd        #查看当前所在的ftp目录
"/aaa"ftp>ls
Entering Passive Mode (127,0,0,1,88,202).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
Directory send OK.
ftp>

2.3.切换ftp的目录

ftp>dir
Entering Passive Mode (127,0,0,1,44,241).
Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Sep 04 07:18aaa
drwxr-xr-x    2 501      501          4096 Sep 05 08:59bbb
Directory send OK.
ftp>ls
Entering Passive Mode (127,0,0,1,71,215).
Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Sep 04 07:18aaa
drwxr-xr-x    2 501      501          4096 Sep 05 08:59bbb
Directory send OK.
ftp>

2.4.查询linux系统信息

1) 查询系统中的文件列表

ftp> ! [linux系统命令] # 在ftp服务器中执行系统命令,之后回到ftp环境中

ftp> ! ls /usr/local/aegis  bin  cloudmonitor  etc  games  include  lib  lib64  libexec  logs  nginx  sbin  share  src

2)切换linux中的工作目录

ftp> lcd /tmp/            #在ftp服务器中切换本地工作目录(登陆ftp前的系统中的目录),可以tab补全
Local directory now /tmp

2.5.下载上传文件或目录

1)创建和删除ftp目录

ftp>mkdir ccc
"/aaa/ccc"created
ftp>ls
Entering Passive Mode (127,0,0,1,194,152).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
drwxr-xr-x    2 501      501          4096 Sep 05 09:06ccc
Directory send OK.
ftp>rmdir ccc
Remove directory operation successful.
ftp>ls
Entering Passive Mode (127,0,0,1,214,114).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
Directory send OK.

2)下载ftp的文件

# 下载单个文件

ftp> !pwd        #查看当前所在的系统工作目录
/tmp
ftp>ls
Entering Passive Mode (127,0,0,1,223,180).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
Directory send OK.
ftp> get aaa1    #下载aaa1文件
local: aaa1 remote: aaa1
Entering Passive Mode (127,0,0,1,33,232).
Opening BINARY mode data connection foraaa1 (0 bytes).
Transfer complete.
ftp>!ls
aaa1
ftp> get aaa2 aaa3    #下载aaa2文件,并命名为aaa3
local: aaa3 remote: aaa2
Entering Passive Mode (127,0,0,1,171,86).
Opening BINARY mode data connection foraaa2 (0 bytes).
Transfer complete.
ftp> !ls          #查看,下载成功
aaa1  aaa3

# 下载多个文件

ftp>mget aaa1 aaa2
mget aaa1? y
Entering Passive Mode (127,0,0,1,83,114).
Opening BINARY mode data connection foraaa1 (0 bytes).
Transfer complete.
mget aaa2? y
Entering Passive Mode (127,0,0,1,217,121).
Opening BINARY mode data connection foraaa2 (0 bytes).
Transfer complete.
ftp> !ls -l
total 1532
-rw-r--r-- 1 root root       0 Sep  5 17:20 aaa1    #可以看到文件创建时间已经更改
-rw-r--r-- 1 root root       0 Sep  5 17:20aaa2
-rw-r--r-- 1 root root       0 Sep  5 17:14 aaa3

3)上传文件

# 上传单个文件

# 创建测试文件

[root@ftpsrv tmp]#touch ddd1
[root@ftpsrv tmp]#touch ddd2
[root@ftpsrv tmp]#ll
total 1532
-rw-r--r-- 1 root root       0 Sep  5 17:20aaa1
-rw-r--r-- 1 root root       0 Sep  5 17:20aaa2
-rw-r--r-- 1 root root       0 Sep  5 17:14aaa3
-rw-r--r-- 1 root root       0 Sep  5 17:23ddd1
-rw-r--r-- 1 root root       0 Sep  5 17:23 ddd2

# 上传

ftp> put ddd1       #上传单个文件,可以tab补全
local: ddd1 remote: ddd1
Entering Passive Mode (127,0,0,1,69,10).
Ok to send data.
Transfer complete.
ftp> put ddd1 eee1    #上传单个文件并改名
local: ddd1 remote: eee1
Entering Passive Mode (127,0,0,1,243,160).
Ok to send data.
Transfer complete.
ftp>ls
Entering Passive Mode (127,0,0,1,234,62).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
drwxr-xr-x    2 501      501          4096 Sep 05 09:18bbb
-rw-r--r--    1 501      501             0 Sep 05 09:23ddd1
-rw-r--r--    1 501      501             0 Sep 05 09:23eee1
Directory send OK

# 上传多个文件

ftp>mput ddd1 ddd2
mput ddd1? y
Entering Passive Mode (127,0,0,1,92,11).
Ok to send data.
Transfer complete.
mput ddd2? y
Entering Passive Mode (127,0,0,1,66,108).
Ok to send data.
Transfer complete.
ftp>ls
Entering Passive Mode (127,0,0,1,191,91).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 09:01aaa1
-rw-r--r--    1 501      501             0 Sep 05 09:02aaa2
drwxr-xr-x    2 501      501          4096 Sep 05 09:18bbb
-rw-r--r--    1 501      501             0 Sep 05 09:27 ddd1    #查看修改时间可以确认已经上传成功
-rw-r--r--    1 501      501             0 Sep 05 09:27ddd2
-rw-r--r--    1 501      501             0 Sep 05 09:23eee1
Directory send OK.

2.6.ftp文件目录操作

1)修改ftp文件名

ftp>rename aaa1 qqq1
Ready forRNTO.
Rename successful.
ftp>ls
Entering Passive Mode (127,0,0,1,29,54).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 17:02aaa2
drwxr-xr-x    2 501      501          4096 Sep 05 17:18bbb
-rw-r--r--    1 501      501             0 Sep 05 17:27ddd1
-rw-r--r--    1 501      501             0 Sep 05 17:27ddd2
-rw-r--r--    1 501      501             0 Sep 05 17:23eee1
-rw-r--r--    1 501      501             0 Sep 05 17:37fff
-rw-r--r--    1 501      501             0 Sep 05 17:01 qqq1    #修改后的文件名
Directory send OK.

2)删除ftp文件

ftp> delete aaa2    #删除aaa2文件
Delete operation successful.
ftp>ls
Entering Passive Mode (127,0,0,1,138,61).
Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Sep 05 17:18bbb
-rw-r--r--    1 501      501             0 Sep 05 17:27ddd1
-rw-r--r--    1 501      501             0 Sep 05 17:27ddd2
-rw-r--r--    1 501      501             0 Sep 05 17:23eee1
-rw-r--r--    1 501      501             0 Sep 05 17:37fff
-rw-r--r--    1 501      501             0 Sep 05 17:01qqq1
Directory send OK.

# 删除多个ftp文件

ftp>mdelete ddd1 ddd2 eee1
mdelete ddd1? y
Delete operation successful.
mdelete ddd2? y
Delete operation successful.
mdelete eee1? y
Delete operation successful.
ftp>ls
Entering Passive Mode (127,0,0,1,166,205).
Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Sep 05 17:18bbb
-rw-r--r--    1 501      501             0 Sep 05 17:37fff
-rw-r--r--    1 501      501             0 Sep 05 17:01qqq1
Directory send OK.

3)删除ftp目录

ftp> rmdir bbb    #删除bbb目录
Remove directory operation successful.
ftp>ls
Entering Passive Mode (127,0,0,1,143,198).
Here comes the directory listing.
-rw-r--r--    1 501      501             0 Sep 05 17:37fff
-rw-r--r--    1 501      501             0 Sep 05 17:01qqq1
Directory send OK.

2.7.其他ftp命令

1)切换传输模式

ftp> ascii        #切换为ascii模式
200Switching to ASCII mode.
ftp> bin        #切换为二进制模式,默认登陆就是二进制传输模式
200 Switching to Binary mode.

2)关闭和重连ftp

ftp> close      #断开ftp的连接
Goodbye.
ftp> ls        #可以看出,无法显示ftp服务器的文件列表
Not connected.
ftp> open 127.0.0.1 21    #重新连接ftp服务器
Connected to 127.0.0.1 (127.0.0.1).
(vsFTPd 2.2.2)
Name (127.0.0.1:root): admin     #使用admin登陆ftp
Please specify the password.
Password:
Login successful.
Remote system type isUNIX.
Using binary mode to transfer files.
ftp> ls        #可以再次查看ftp服务器的文件列表
Entering Passive Mode (127,0,0,1,227,247).
Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Sep 05 17:47aaa
drwxr-xr-x    2 501      501          4096 Sep 05 16:59bbb
Directory send OK.

3) 退出ftp会话

ftp> quit    #也可以使用bye和exit
221Goodbye.
[root@ftpsrv vsftpd]#
ftp操作命令

原文:https://www.cnblogs.com/tssc/p/9593614.html

1.登陆ftp服务器

ftp [IP] [PORT]        # 登陆ftp服务器,本机登陆可以不写IP
实例演示:
1
2
3
4
5
6
7
8
9
10
[root@ftpsrv vsftpd]# ftp 127.0.0.1 21
Connected to 127.0.0.1 (127.0.0.1).
(vsFTPd 2.2.2)
Name (127.0.0.1:root): nice
Please specify the password.
Password:
Login successful.
Remote systemtypeis UNIX.
Using binary mode to transfer files.
ftp>

可以看出登陆后默认为二进制传输模式

2.ftp子命令

2.1.帮助命令

1
ftp> ?|help # 显示ftp内部命令的帮助信息

2.2.查看ftp中的文件列表(ls和dir都可以查看)

1
2
3
4
5
6
7
8
9
10
11
12
13
ftp> dir
Entering Passive Mode (127,0,0,1,44,241).
Here comes the directory listing.
drwxr-xr-x 2 501 501 4096 Sep 04 07:18 aaa
drwxr-xr-x 2 501 501 4096 Sep 05 08:59 bbb
Directory send OK.
ftp> ls
Entering Passive Mode (127,0,0,1,71,215).
Here comes the directory listing.
drwxr-xr-x 2 501 501 4096 Sep 04 07:18 aaa
drwxr-xr-x 2 501 501 4096 Sep 05 08:59 bbb
Directory send OK.
ftp>

2.3.切换ftp的目录

1
2
3
4
5
6
7
8
9
10
11
ftp> cd aaa      # 切换到ftp的aaa目录
Directory successfully changed.
ftp> pwd        # 查看当前所在的ftp目录
"/aaa"
ftp> ls
Entering Passive Mode (127,0,0,1,88,202).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
Directory send OK.
ftp>

2.4.查询linux系统信息

1) 查询系统中的文件列表

1
ftp> ! [linux系统命令] # 在ftp服务器中执行系统命令,之后回到ftp环境中
1
2
ftp> ! ls /usr/local/
aegis bin cloudmonitor etc games include lib lib64 libexec logs nginx sbin share src

2)切换linux中的工作目录

1
2
ftp> lcd /tmp/ # 在ftp服务器中切换本地工作目录(登陆ftp前的系统中的目录),可以tab补全
Local directory now /tmp

2.5.下载上传文件或目录

1)创建和删除ftp目录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ftp> mkdir ccc
"/aaa/ccc"created
ftp> ls
Entering Passive Mode (127,0,0,1,194,152).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
drwxr-xr-x 2 501 501 4096 Sep 05 09:06 ccc
Directory send OK.
ftp> rmdir ccc
Remove directory operation successful.
ftp> ls
Entering Passive Mode (127,0,0,1,214,114).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
Directory send OK.

2)下载ftp的文件

# 下载单个文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ftp> !pwd     # 查看当前所在的系统工作目录
/tmp
ftp> ls
Entering Passive Mode (127,0,0,1,223,180).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
Directory send OK.
ftp> get aaa1    # 下载aaa1文件
local: aaa1 remote: aaa1
Entering Passive Mode (127,0,0,1,33,232).
Opening BINARY mode data connectionforaaa1 (0 bytes).
Transfer complete.
ftp> !ls
aaa1
ftp> get aaa2 aaa3    # 下载aaa2文件,并命名为aaa3
local: aaa3 remote: aaa2
Entering Passive Mode (127,0,0,1,171,86).
Opening BINARY mode data connectionforaaa2 (0 bytes).
Transfer complete.
ftp> !ls          # 查看,下载成功
aaa1 aaa3

# 下载多个文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ftp> mget aaa1 aaa2
mget aaa1? y
Entering Passive Mode (127,0,0,1,83,114).
Opening BINARY mode data connectionforaaa1 (0 bytes).
Transfer complete.
mget aaa2? y
Entering Passive Mode (127,0,0,1,217,121).
Opening BINARY mode data connectionforaaa2 (0 bytes).
Transfer complete.
ftp> !ls -l
total 1532
-rw-r--r-- 1 root root 0 Sep 5 17:20 aaa1    # 可以看到文件创建时间已经更改
-rw-r--r-- 1 root root 0 Sep 5 17:20 aaa2
-rw-r--r-- 1 root root 0 Sep 5 17:14 aaa3

3)上传文件

# 上传单个文件

# 创建测试文件

1
2
3
4
5
6
7
8
9
[root@ftpsrv tmp]# touch ddd1
[root@ftpsrv tmp]# touch ddd2
[root@ftpsrv tmp]# ll
total 1532
-rw-r--r-- 1 root root 0 Sep 5 17:20 aaa1
-rw-r--r-- 1 root root 0 Sep 5 17:20 aaa2
-rw-r--r-- 1 root root 0 Sep 5 17:14 aaa3
-rw-r--r-- 1 root root 0 Sep 5 17:23 ddd1
-rw-r--r-- 1 root root 0 Sep 5 17:23 ddd2

# 上传

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ftp> put ddd1       # 上传单个文件,可以tab补全
local: ddd1 remote: ddd1
Entering Passive Mode (127,0,0,1,69,10).
Ok to send data.
Transfer complete.
ftp> put ddd1 eee1    # 上传单个文件并改名
local: ddd1 remote: eee1
Entering Passive Mode (127,0,0,1,243,160).
Ok to send data.
Transfer complete.
ftp> ls
Entering Passive Mode (127,0,0,1,234,62).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
drwxr-xr-x 2 501 501 4096 Sep 05 09:18 bbb
-rw-r--r-- 1 501 501 0 Sep 05 09:23 ddd1
-rw-r--r-- 1 501 501 0 Sep 05 09:23 eee1
Directory send OK

# 上传多个文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ftp> mput ddd1 ddd2
mput ddd1? y
Entering Passive Mode (127,0,0,1,92,11).
Ok to send data.
Transfer complete.
mput ddd2? y
Entering Passive Mode (127,0,0,1,66,108).
Ok to send data.
Transfer complete.
ftp> ls
Entering Passive Mode (127,0,0,1,191,91).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 09:01 aaa1
-rw-r--r-- 1 501 501 0 Sep 05 09:02 aaa2
drwxr-xr-x 2 501 501 4096 Sep 05 09:18 bbb
-rw-r--r-- 1 501 501 0 Sep 05 09:27 ddd1    # 查看修改时间可以确认已经上传成功
-rw-r--r-- 1 501 501 0 Sep 05 09:27 ddd2
-rw-r--r-- 1 501 501 0 Sep 05 09:23 eee1
Directory send OK.

2.6.ftp文件目录操作

1)修改ftp文件名

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ftp> rename aaa1 qqq1
ReadyforRNTO.
Rename successful.
ftp> ls
Entering Passive Mode (127,0,0,1,29,54).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 17:02 aaa2
drwxr-xr-x 2 501 501 4096 Sep 05 17:18 bbb
-rw-r--r-- 1 501 501 0 Sep 05 17:27 ddd1
-rw-r--r-- 1 501 501 0 Sep 05 17:27 ddd2
-rw-r--r-- 1 501 501 0 Sep 05 17:23 eee1
-rw-r--r-- 1 501 501 0 Sep 05 17:37 fff
-rw-r--r-- 1 501 501 0 Sep 05 17:01 qqq1    # 修改后的文件名
Directory send OK.

2)删除ftp文件

1
2
3
4
5
6
7
8
9
10
11
12
ftp> delete aaa2    # 删除aaa2文件
Delete operation successful.
ftp> ls
Entering Passive Mode (127,0,0,1,138,61).
Here comes the directory listing.
drwxr-xr-x 2 501 501 4096 Sep 05 17:18 bbb
-rw-r--r-- 1 501 501 0 Sep 05 17:27 ddd1
-rw-r--r-- 1 501 501 0 Sep 05 17:27 ddd2
-rw-r--r-- 1 501 501 0 Sep 05 17:23 eee1
-rw-r--r-- 1 501 501 0 Sep 05 17:37 fff
-rw-r--r-- 1 501 501 0 Sep 05 17:01 qqq1
Directory send OK.

# 删除多个ftp文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ftp> mdelete ddd1 ddd2 eee1
mdelete ddd1? y
Delete operation successful.
mdelete ddd2? y
Delete operation successful.
mdelete eee1? y
Delete operation successful.
ftp> ls
Entering Passive Mode (127,0,0,1,166,205).
Here comes the directory listing.
drwxr-xr-x 2 501 501 4096 Sep 05 17:18 bbb
-rw-r--r-- 1 501 501 0 Sep 05 17:37 fff
-rw-r--r-- 1 501 501 0 Sep 05 17:01 qqq1
Directory send OK.

3)删除ftp目录

1
2
3
4
5
6
7
8
ftp> rmdir bbb    # 删除bbb目录
Remove directory operation successful.
ftp> ls
Entering Passive Mode (127,0,0,1,143,198).
Here comes the directory listing.
-rw-r--r-- 1 501 501 0 Sep 05 17:37 fff
-rw-r--r-- 1 501 501 0 Sep 05 17:01 qqq1
Directory send OK.

2.7.其他ftp命令

1)切换传输模式

1
2
3
4
ftp> ascii       # 切换为ascii模式
200 Switching to ASCII mode.
ftp> bin        # 切换为二进制模式,默认登陆就是二进制传输模式
200 Switching to Binary mode.

2)关闭和重连ftp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ftp> close      # 断开ftp的连接
Goodbye.
ftp> ls        # 可以看出,无法显示ftp服务器的文件列表
Not connected.
ftp> open 127.0.0.1 21    # 重新连接ftp服务器
Connected to 127.0.0.1 (127.0.0.1).
(vsFTPd 2.2.2)
Name (127.0.0.1:root): admin     # 使用admin登陆ftp
Please specify the password.
Password:
Login successful.
Remote systemtypeis UNIX.
Using binary mode to transfer files.
ftp> ls        # 可以再次查看ftp服务器的文件列表
Entering Passive Mode (127,0,0,1,227,247).
Here comes the directory listing.
drwxr-xr-x 2 501 501 4096 Sep 05 17:47 aaa
drwxr-xr-x 2 501 501 4096 Sep 05 16:59 bbb
Directory send OK.

3) 退出ftp会话

1
2
3
ftp> quit    # 也可以使用bye和exit
221 Goodbye.
[root@ftpsrv vsftpd]#

免责声明:文章转载自《Linux FTP基本操作命令 ( 序列二 ftp)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Java线程间通信-回调的实现方式Numpy的补充(重要!!)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

在Centos7中,从主机 Windows 上无法远程访问 Linux 上rabbitmq的解决方法

  当在 Linux 上配置好 Rabbitmq服务器后,如果从主机中无法访问到 Linux 中的Rabbitmq服务器时,需要做如下的检查: 1. Rabbitmq是否启动成功 在控制台输入: ps -ef | grep rabbitmq 命令含义:从当前所有进程中查找是否含有rabbitmq进程 如果有内容显示,则说明 Rabbitmq启动成功   否...

git基础

1. Git配置 Git 提供了一个叫做git config 的工具,专门用来配置或读取相应的工作环境变量。这些环境变量,可以存放在以下三个不同的地方: /etc/gitconfig文件:系统中对所有用户都普遍适用的配置。若使用git config 时用--system 选项,读写的就是这个文件。 ~/.gitconfig文件:用户目录下的配置文件只适...

linux命令集合

查找当前路径文件内容: find ./ -name "*" | xargs grep "kaka" 查找文件位置: locate ** 查看系统磁盘空间: df -h 查看某目录占用空间: du -h ./ 查看某文件夹内占用磁盘空间: du -sh * 查看指定文件夹占用磁盘空间:du -sh /company 查看文件夹内文件的个数: find ./...

linux 安装 sftp

1,sftp:登陆命令 Xshell:> sftp root@192.168.159.128 Connecting to 192.168.159.128:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Your current local dire...

visual studio(vs)中项目解决方案的目录组织安排

最进要用vs建立一个解决方案,同时也要依赖一些第三方库,为了以后便于维护,因此想让解决方案的各个文件夹的组织更加合理。通过网上搜索一些网友的解决方案,发现大致可以分为两种,分别参见网址https://blog.csdn.net/lp310018931/article/details/47991759和https://www.cnblogs.com/zuib...

linux下用/proc/stat文件来计算cpu的利用率-c语言实现

proc文件系统介绍       /proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间。它以文件系统的方式为内核与进程提供通信的接口。用户和应用程序可以通过/proc得到系统的信息,并可以改变内核的某些参数。由于系统的信息,如进程,是动态改变的,所以用户或应用程序读取/proc目录中的文件时,proc文件系统是动态从系统内核读出所需信息并...