filezilla客户端的应用以及ftplftpwget的用法

news2024/9/20 4:59:31

filezilla的应用

用户的配置查看上一篇文章FTP3种用户的配置

进入filezilla软件测试
用yy用户登录发现可以上传下载创建删除
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

再用cc用户登录发现不能上传不能删除不能创建只能下载

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

ftp&lftp&wget客户端的应用

以命令行的方式连接ftp,一般只会用到上传和下载两种操作

上传只能用ftp(麻烦)和lftp(方便)

下载可以用ftp、lftp和wget

先看ftp和lftp命令由哪个包提供的
[root@cjy ~]# yum provides *bin/ftp
Last metadata expiration check: 1:53:47 ago on Wed 13 Dec 2023 03:22:46 PM CST.
ftp-0.17-89.el9.x86_64 : The standard UNIX FTP (File Transfer Protocol) client
Repo        : appstream
Matched from:
Other       : *bin/ftp

[root@cjy ~]# yum provides *bin/lftp
Last metadata expiration check: 1:54:50 ago on Wed 13 Dec 2023 03:22:46 PM CST.
lftp-4.9.2-4.el9.i686 : A sophisticated file transfer program
Repo        : appstream
Matched from:
Other       : *bin/lftp

lftp-4.9.2-4.el9.x86_64 : A sophisticated file transfer program
Repo        : appstream
Matched from:
Other       : *bin/lftp

下载2个服务
[root@cjy ~]# yum -y install ftp lftp
ftp的用法
[root@cjy ~]# ftp -h

	Usage: { ftp | pftp } [-Apinegvtd] [hostname]
	   -A: enable active mode
	   -p: enable passive mode (default for ftp and pftp)
	   -i: turn off prompting during mget
	   -n: inhibit auto-login
	   -e: disable readline support, if present
	   -g: disable filename globbing
	   -m: don't force data channel interface to the same as control channel
	   -v: verbose mode
	   -t: enable packet tracing [nonfunctional]
	   -d: enable debugging

使用ftp命令连接并下载

[root@cjy ~]# ls
anaconda-ks.cfg
[root@cjy ~]# ftp 192.168.159.141
Connected to 192.168.159.141 (192.168.159.141).
220 (vsFTPd 3.0.5)
Name (192.168.159.141:root): yy    此处输入错误只能用ctrl+u删除
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ?
Commands may be abbreviated.  Commands are:

!		debug		mdir		sendport	site
$		dir		mget		put		size
account		disconnect	mkdir		pwd		status
append		exit		mls		quit		struct
ascii		form		mode		quote		system
bell		get		modtime		recv		sunique
binary		glob		mput		reget		tenex
bye		hash		newer		rstatus		tick
case		help		nmap		rhelp		trace
cd		idle		nlist		rename		type
cdup		image		ntrans		reset		user
chmod		lcd		open		restart		umask
close		ls		prompt		rmdir		verbose
cr		macdef		passive		runique		?
delete		mdelete		proxy		send
ftp> ls
227 Entering Passive Mode (192,168,159,141,165,64).
150 Here comes the directory listing.
-rw-r--r--    1 1001     1001            3 Dec 13 09:00 666.txt
226 Directory send OK.
ftp> get 666.txt
local: 666.txt remote: 666.txt
227 Entering Passive Mode (192,168,159,141,46,181).
150 Opening BINARY mode data connection for 666.txt (3 bytes).
226 Transfer complete.
3 bytes received in 2.8e-05 secs (107.14 Kbytes/sec)
ftp> bye
221 Goodbye.
[root@cjy ~]# ls
666.txt  anaconda-ks.cfg

下载文件到指定目录
[root@cjy ~]# ls /opt/
[root@cjy ~]# ftp 192.168.159.141
Connected to 192.168.159.141 (192.168.159.141).
220 (vsFTPd 3.0.5)
Name (192.168.159.141:root): yy
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> lcd /opt
Local directory now /opt
ftp> get 666.txt
local: 666.txt remote: 666.txt
227 Entering Passive Mode (192,168,159,141,234,114).
150 Opening BINARY mode data connection for 666.txt (3 bytes).
226 Transfer complete.
3 bytes received in 0.000116 secs (25.86 Kbytes/sec)
[root@cjy ~]# ls /opt/
666.txt

上传

[root@cjy ~]# touch /opt/555
[root@cjy ~]# ls /opt/
555  666.txt
切到ftp
ftp> put 555
local: 555 remote: 555
227 Entering Passive Mode (192,168,159,141,209,154).
150 Ok to send data.
226 Transfer complete.
ftp> ls
227 Entering Passive Mode (192,168,159,141,211,44).
150 Here comes the directory listing.
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:00 666.txt
226 Directory send OK.

创建

ftp> mkdir hh
257 "/hh" created
ftp> ls
227 Entering Passive Mode (192,168,159,141,148,253).
150 Here comes the directory listing.
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:00 666.txt
drwxr-xr-x    2 1001     1001            6 Dec 13 09:30 hh
226 Directory send OK.

[root@cjy ~]# ls /opt/
555  666.txt
[root@cjy ~]# ls /data/
555  666.txt  hh

删除

删目录
rmdir只能删除没有文件的空目录
ftp> rmdir hh
250 Remove directory operation successful.
ftp> ls
227 Entering Passive Mode (192,168,159,141,118,51).
150 Here comes the directory listing.
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:00 666.txt
226 Directory send OK.
删文件
ftp> delete 666.txt
250 Delete operation successful.
ftp> ls
227 Entering Passive Mode (192,168,159,141,104,161).
150 Here comes the directory listing.
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
226 Directory send OK.

lftp的用法
[root@cjy ~]# lftp --help
Usage: lftp [OPTS] <site>
`lftp' is the first command executed by lftp after rc files
 -f <file>           execute commands from the file and exit
 -c <cmd>            execute the commands and exit
 --norc              don't execute rc files from the home directory
 --help              print this help and exit
 --version           print lftp version and exit
Other options are the same as in `open' command:
 -e <cmd>            execute the command just after selecting
 -u <user>[,<pass>]  use the user/password for authentication
 -p <port>           use the port for connection
 -s <slot>           assign the connection to this slot
 -d                  switch on debugging mode
 <site>              host name, URL or bookmark name

登录

[root@cjy ~]# lftp -u yy,123 192.168.159.141
lftp yy@192.168.159.141:~> 

帮助文档

lftp yy@192.168.159.141:~> help
    !<shell-command>                     (commands)
    alias [<name> [<value>]]             attach [PID]
    bookmark [SUBCMD]                    cache [SUBCMD]
    cat [-b] <files>                     cd <rdir>
    chmod [OPTS] mode file...            close [-a]
    [re]cls [opts] [path/][pattern]      debug [OPTS] [<level>|off]
    du [options] <dirs>                  edit [OPTS] <file>
    exit [<code>|bg]                     get [OPTS] <rfile> [-o <lfile>]
    glob [OPTS] <cmd> <args>             help [<cmd>]
    history -w file|-r file|-c|-l [cnt]  jobs [-v] [<job_no...>]
    kill all|<job_no>                    lcd <ldir>
    lftp [OPTS] <site>                   ln [-s] <file1> <file2>              ls [<args>]
    mget [OPTS] <files>                  mirror [OPTS] [remote [local]]
    mkdir [OPTS] <dirs>                  module name [args]                   more <files>
    mput [OPTS] <files>                  mrm <files>
    mv <file1> <file2>                   mmv [OPTS] <files> <target-dir>
    [re]nlist [<args>]                   open [OPTS] <site>
    pget [OPTS] <rfile> [-o <lfile>]     put [OPTS] <lfile> [-o <rfile>]      pwd [-p]
    queue [OPTS] [<cmd>]                 quote <cmd>
    repeat [OPTS] [delay] [command]      rm [-r] [-f] <files>
    rmdir [-f] <dirs>                    scache [<session_no>]
    set [OPT] [<var> [<val>]]            site <site-cmd>
    source <file>                        torrent [OPTS] <file|URL>...
    user <user|URL> [<pass>]             wait [<jobno>]                       zcat <files>
    zmore <files>

创建

创建文件(以文本编辑器的方式打开一个新文件,需要写入内容,不然无法创建)
lftp yy@192.168.159.141:/> edit 123
get: Access failed: 550 Failed to open file. (123)
lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            6 Dec 13 09:46 123
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
创建目录
lftp yy@192.168.159.141:/> mkdir 888
mkdir ok, `888' created
lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            6 Dec 13 09:46 123
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555
drwxr-xr-x    2 1001     1001            6 Dec 13 09:47 888

删除

rm -rf文件目录都可以删除
lftp yy@192.168.159.141:/> rm -rf 123
rm ok, `123' removed
lftp yy@192.168.159.141:/> rm -rf 888
rm ok, `888' removed
lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:28 555

上传

[root@cjy ~]# ls /opt/
555  666.txt

put只能上传文件
lftp yy@192.168.159.141:/> ls
lftp yy@192.168.159.141:/> put 555 666.txt
3 bytes transferred
Total 2 files transferred
lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt

mirror才能上传目录
[root@cjy ~]# ls
555  666.txt  anaconda-ks.cfg  hh

lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt
lftp yy@192.168.159.141:/> mirror -R hh
lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt
drwxr-xr-x    2 1001     1001            6 Dec 13 09:59 hh

下载

[root@cjy ~]# rm -rf 555 666.txt
[root@cjy ~]# ls
anaconda-ks.cfg  hh

get只能下载文件
lftp yy@192.168.159.141:/> get 555 666.txt
3 bytes transferred
Total 2 files transferred

[root@cjy ~]# ls
555  666.txt  anaconda-ks.cfg  hh

mirrot才能下载目录
[root@cjy ~]# ls
555  666.txt  anaconda-ks.cfg  hh

lftp yy@192.168.159.141:/> ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt
drwxr-xr-x    2 1001     1001            6 Dec 13 09:59 hh
lftp yy@192.168.159.141:/> mirror hh xx

[root@cjy ~]# ls
555  666.txt  anaconda-ks.cfg  hh  xx

-e 可以不进lftp里面使用命令

[root@cjy ~]# lftp -u yy,123 192.168.159.141 -e ls
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt
drwxr-xr-x    2 1001     1001            6 Dec 13 09:59 hh
lftp yy@192.168.159.141:/> quit
[root@cjy ~]# lftp -u yy,123 192.168.159.141 -e 'ls;quit'
-rw-r--r--    1 1001     1001            0 Dec 13 09:51 555
-rw-r--r--    1 1001     1001            3 Dec 13 09:51 666.txt
drwxr-xr-x    2 1001     1001            6 Dec 13 09:59 hh

快速登录的别名

[root@cjy ~]# alias dl='lftp -u yy,123 192.168.159.141'
[root@cjy ~]# dl
lftp yy@192.168.159.141:~> quit
wget的用法

用wget -h查看用法

先下载服务
[root@cjy ~]# yum -y install wget

下载

[root@cjy ~]# ls
666.txt  anaconda-ks.cfg  xx
[root@cjy ~]# wget --ftp-user yy --ftp-password 123 192.168.159.141:666.txt
--2023-12-13 18:15:47--  ftp://192.168.159.141/666.txt
           => ‘666.txt.1’
Connecting to 192.168.159.141:21... connected.
Logging in as yy ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD not needed.
==> SIZE 666.txt ... 3
==> PASV ... done.    ==> RETR 666.txt ... done.
Length: 3 (unauthoritative)

666.txt.1              100%[===========================>]       3  --.-KB/s    in 0s      

2023-12-13 18:15:47 (113 KB/s) - ‘666.txt.1’ saved [3]

[root@cjy ~]# ls
666.txt  666.txt.1  anaconda-ks.cfg  xx

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1535700.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

MAC废纸篓删掉还能复原吗 MAC废纸篓倾倒掉的文件怎么恢复 删除的东西在哪里可以找回来 怎么找回已删除的文件

MAC系统中的废纸篓&#xff08;Trash&#xff09;通常指用来临时存放用户即将丢弃的文件的地方。MAC系统的废纸篓功能相当于Windows系统的垃圾回收站&#xff0c;通过废纸篓删除的文件&#xff0c;一般是无法从系统中操作还原。那么&#xff0c;MAC废纸篓删掉还能复原吗&#x…

Linux系统(四)- 进程初识 | 环境变量 | 进程地址空间

~~~~ 前言冯诺依曼体系结构&#xff08;重要&#xff09;总览CPU工作方式什么是指令集&#xff1f;CPU为什么只和内存打交道&#xff08;数据交换&#xff09;&#xff1f;木桶效应&#xff1a;在数据层面的结论程序运行为什么要加载到内存&#xff1f; 进一步理解计算机体系结…

应用APM-如何配置Prometheus + Grafana监控springboot应用

文章目录 概述在Spring Boot应用中集成Micrometerspringboot配置修改 Docker安装Prometheus和Grafanaprometheus配置grafana配置启动Prometheus和Grafana在Grafana中配置数据源创建Grafana仪表盘配置Grafana告警&#xff08;可选&#xff09;监控和分析 概述 配置Prometheus和…

NASA数据集——2017 年来自 Arctic-CAP 的大气中 CO、CO2 和 CH4 浓度剖面图

简介 ABoVE: Atmospheric Profiles of CO, CO2 and CH4 Concentrations from Arctic-CAP, 2017 文件修订日期&#xff1a;2019-05-01 数据集版本: 1 数据集摘要 本数据集提供了 2017 年 4 月至 11 月北极碳飞机剖面&#xff08;Arctic-CAP&#xff09;月度采样活动期间阿拉…

MIT的研究人员最近开发了一种名为“FeatUp”的新算法,这一突破性技术为计算机视觉领域带来了高分辨率的洞察力

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

【冥想X理工科思维】场景10:长期项目的焦虑和压力

冥想音频合集&#xff1a;职场解压冥想音频 压力场景&#xff1a; 在长期项目中&#xff0c;如何定期冥想帮我保持耐心和持久性&#xff1f; 点击看大图&#xff1a; 详细说明&#xff1a;通过这个冥想流程&#xff0c;你可以帮助自己在长期项目中保持耐心、坚持和放松的状态。…

SAP前台处理:物料主数据创建<MM01>之会计视图

一、背景&#xff1a; 终于来到了物料主数据&#xff0c;我觉得物料账是SAP最重要的一项发明&#xff0c;也一直是SAP的一项重要优势&#xff0c;物料账记录了一个个物料的生生不息&#xff1b; 本章主要讲解物料主数据和财务相关的主要内容&#xff1a;这里特别提示由于作者…

类和对象-4

文章目录 前言const成员函数取地址及const取地址操作符重载构造函数续explicit static成员友元内部类匿名对象 前言 在前面的文章中&#xff0c;我们了解到了类的四个默认成员函数&#xff1a;构造、析构、拷贝构造和赋值重载。接下来我们会继续学习剩下的两个默认成员函数以及…

CAD建筑版2024 安装教程

CAD建筑版是一种专门用于建筑设计和绘图的CAD软件版本。它提供了专业的建筑设计工具和功能&#xff0c;帮助建筑师、设计师和工程师在建筑领域进行快速、准确和高效的设计工作。 CAD建筑版具备建筑相关的库和元素&#xff0c;用户可以方便地使用预定义的建筑符号和元素进行建筑…

二叉树|104.二叉树的最大深度 111.二叉树的最小深度

104.二叉树的最大深度 力扣题目链接 class solution { public:int getdepth(TreeNode* node) {if (node NULL) return 0;int leftdepth getdepth(node->left); // 左int rightdepth getdepth(node->right); // 右int depth 1 max(leftdepth, rightdepth…

嵌入式-4种经典继电器驱动电路-单片机IO端口/三极管/达林顿管/嵌套连接

文章目录 一&#xff1a;继电器原理二&#xff1a;单片机驱动电路三&#xff1a;经典继电器驱动电路方案3.1 继电器驱动电路方案一&#xff1a;I/O端口灌电流方式的直接连接3.1.1 方案一的继电器特性要求3.1.2 方案一可能会损坏I/O口 3.2 继电器驱动电路方案二&#xff1a;三极…

记录一次基于AES加密的恶意软件逆向分析和解密过程(含文件)

导入(Imports)和字符串 首先,用IDA或Ghidra加载文件test.dat,文件为64位文件 IDA点击View==>Open subviews==>Imports,查看导入信息 Ghidra可以直接看到 可以看到,导入函数有: __printf_chk, malloc, __isoc99_sscanf, putchar, __stack_chk_fail, __cxa_fina…

安捷伦Agilent E8361C网络分析仪

181/2461/8938产品概述&#xff1a; 安捷伦e 8361 c网络分析仪提供通用网络分析&#xff0c;可选软件和/或硬件为您的应用定制-如多端口、脉冲射频等。 安捷伦E8361C网络分析仪的显示窗口数量不限&#xff0c;可以调整大小和重新排列&#xff0c;每个窗口最多有24条活动轨迹和…

CSS 脱离标准文档流 浮动

浮动 在标准流当中&#xff0c;元素或者标签在页面上摆放的时候会出现不如意的地方。要想解决这些问题可以采用脱离标准流的方式来进行解决这些问题&#xff0c;脱离标准流也称为脱离文档流。 脱离标准流的解决方式有三种&#xff0c;一种是浮动&#xff0c;另外一种是固定定位…

【Flask】Flask项目结构初识

1.前提准备 Python版本 # python 3.8.0 # 查看Python版本 python --version 安装第三方 Flask pip install flask # 如果安装失败&#xff0c;可以使用 -i&#xff0c;指定使用国内镜像源 # 清华镜像源&#xff1a;https://pypi.tuna.tsinghua.edu.cn/simple/ 检查 Flask 是…

大数据分析-基于Python的电影票房信息数据的爬取及分析

概要 现如今&#xff0c;人民群众对物质生活水平的要求已不再局限于衣食住行&#xff0c;对于精神文化有了更多的需求。电影在我国越来越受欢迎&#xff0c;电影业的发展越来越迅猛&#xff0c;为了充分利用互联网技术的发展&#xff0c;掌握电影业的态势&#xff0c;对信息进行…

【3GPP】【核心网】【4G】4G手机接入过程,手机附着过程(超详细)

1. 4G手机接入过程&#xff0c;手机附着过程 附着&#xff08;Attach&#xff09;&#xff1a; 终端在PLMN中注册&#xff0c;从而建立自己的档案&#xff0c;即终端上下文 进行附着的三种情况&#xff1a; ①终端开机后的附着&#xff0c;初始附着 ②终端从覆盖盲区返回到…

全栈的自我修养 ———— uniapp中加密方法

直接按部就班一步一步来 一、首先创建一个js文件填入AES二、创建加密解密方法三、测试 一、首先创建一个js文件填入AES 直接复制以下内容 /* CryptoJS v3.1.2 code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wi…

(ROOT)KAFKA详解

生产篇 使用 /** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to Y…

使用Windows的“远程桌面连接”Ubuntu主机连接不上问题解决

问题描述&#xff1a; 使用Windows自带的“远程桌面连接”来连接自己的Ubuntu的系统的过程中&#xff0c;自己已经成功安装了 xrdp 文件包&#xff0c;但是在使用“远程桌面连接”时&#xff0c;自己的“远程桌面连接”软件在输入Ubuntu系统的用户名和密码后&#xff0c;连接不…