linux
ftp中put和get的区别?
一、ftp中put和get的区别?
put是将单个文件上传到服务器。get是将单个文件下载到客户端电脑。如果想要一次传输多个文件需要使用mput,mget,例如:mput *.bat,上传所有扩展名是bat的文件。可以在自动任务中添加脚本运行FTP命令,将put或get根据需要写成命令自动调用。
二、Linuxshell脚本ftp传输文件?
这个不是一句话搞定的vi xxxx.sh 写一个脚本#/bin/bashDATE=`date "%Y%M%D"`DIR=/xxxxx/xxxcd $DIRlftp -pxxx ftp@192.168.1.1cd xxxxxget $DATE.txtexitchmod +x xxxx.sh然后 sh xxxx.sh大致的结构这样,具体的你要好好研究一下shell才可以。
三、请问,如何在linux里下载文件?
1。不需要开FTP
2。在LINUX下有multiget,Kget,wget,D4X,浏览器还有个DOWNTHEMALL,还有proz等等,当然也可以用wine装迅雷下载。
3。linux里文件后缀名,我们常见的rpm,deb,tar.gz,bz,bz2等等,
tar :tar 包(不压缩的)
tar.gz 和 tar.bz2 :tar 包,第一个 gnuzip 压缩的,第二个是 bzip2 压缩的。
rpm : rpm 软件包管理系统的软件包。(和 windows 下面的 .msi 性质类似)主要用在 RH、FC、红旗等系列
deb : deb 软件包管理系统的软件包。主要用在 ubuntu 和 debian 系列。
bin :一般表明他是一个二进制程序,可以赋予可运行权限后运行。比如 Realplayer for Linux 这个垃圾软件的安装程序就是这个扩展名。
run :同上,不过他是一个以脚本语言为基础的。ati 和 nvidia 的驱动都是这个扩展名。
sh :脚本,给权限后命令行下运行。
扩展名主要是为了便于立即识别文件内容,Linux 继承了 UNIX 下面的那种基于文件内容(文件头)的分析内容获得文件类型的方式。一般文件管理器里面都是这样识别出来的。
4。软件安装一般在/usr/或/usr/local/下,软件的可执行文件放在/bin/或/usr/bin下,库文件一般在/lib/或/usr/lib/下。有的软件里面有readme或install文件,里面有安装路径,rpm或deb文件也可以指定安装路径。
5。只要是linux版本的应用软件都可以安装,但是必须解决依赖问题,有的要在线下载依赖包来解决编译问题。
四、怎么设置postgresql为linux中的系统服务?
逐个解答。但根据问题间的关系,回答顺序和你提问的顺序有所不同。 ============================================= “请写出尽量多的方法,并说明方法的原理。” --------------------------------------------- 我用Everest Linux 0.6是Redhat系列的远方旁枝。源自Redhat的发行版有类似的服务管理方式。太多的方法没有用,一种基本方法再加两三种附加变体方法足矣。 ============================================= “如何关闭服务及如何手动开启服务” --------------------------------------------- 简而言之: service [服务名] start service [服务名] stop 细节见下。
以我的现状为例,所有的主要独立服务都在“/etc/rc.d/init.d”中有对应的控制脚本,能控制服务的启停、重启,甚至不重启而重新加载配置。当然,也可以自己制作自己的控制脚本。
我自己制作了Apache、Tomcat、PostgreSQL和花生壳的控制脚本。
[root@TFW-EVL06-LT /]# ls -l /etc/rc.d/init.d/ 总计 316 …… -rwxr-xr-x 1 root root 1773 2009-04-20 smb …… -rwxr-xr-x 1 root root 3340 2008-12-06 sshd …… lrwxrwxrwx 1 root root 66 2009-08-20 tfw_httpd -> /ext/prog/c/Apache/Httpd.EverestLinux-0.6-tb20090422/tfw/rc_script lrwxrwxrwx 1 root root 61 2009-08-20 tfw_pgsql -> /ext/prog/m/PostgreSQL.Everest-Linux-0.6-tb0422/tfw_rc_script lrwxrwxrwx 1 root root 32 2009-08-20 tfw_phlinux -> /usr/local/phlinux/tfw_rc_script lrwxrwxrwx 1 root root 39 2009-08-20 tfw_tomcat -> /ext/prog/c/Apache/Tomcat/tfw/rc_script …… -rwxr-xr-x 1 root root 2497 2008-12-06 xinetd …… [root@TFW-EVL06-LT /]# 以此为例,可以用“service smbd start”来启动Windows网络邻居服务;用“service sshd stop”来关闭安全隧道登录服务;用“service tfw_pgsql reload”不重启地重新加载PostgreSQL配置;用“service tfw_phlinux restart”重新启动花生壳。 ============================================= “读哪个文件判断是否启动服务” --------------------------------------------- 没有简述,想了解请看完。
在“/etc/rc.d/rc[N].d”目录里存放着上述脚本的链接。“[N]”为0~6间的数字,对应系统运行级别。
以运行级别3为例:
[root@TFW-EVL06-LT /]# ls -l /etc/rc.d/rc3.d/ 总计 0 …… lrwxrwxrwx 1 root root 20 03-03 13:00 K04tfw_tomcat -> ../init.d/tfw_tomcat …… lrwxrwxrwx 1 root root 14 2009-08-20 S55sshd -> ../init.d/sshd …… [root@TFW-EVL06-LT /]# 这些链接有的以“K”开头,有的以“S”开头。 系统在切换都一个运行级别时,会首先检查以“K”开头的链接,按其后面两位数字所标明的顺序依次检查这些链接所对应的服务;如果开着就以“stop”参数调用服务控制脚本关闭此服务。 例子中“/etc/rc.d/rc3.d/K04tfw_tomcat”的含义即为“当系统切换到运行级别3时,检查一下Tomcat是否在运行;如果在运行,就用‘service tfw_tomcat stop’关掉Tomcat”。 在关完服务后,系统再根据数字依次检查以“S”开头的链接,如果对应的服务没有开启,就以“start”参数调用服务控制脚本开启此服务。 例子中“/etc/rc.d/rc3.d/S55sshd”的含义即为“当系统切换到运行级别3时,检查一下安全登录遂道是否在运行;如果没在运行,就用‘service sshd start’启动安全登录遂道”。 ============================================= “如何查询已经开启的服务” --------------------------------------------- 没有简述,想了解请看完。 [root@TFW-EVL06-LT /]# service network status Coppied. 配置设备: lo eth0 ppp0 当前的活跃设备: lo eth0 ppp0 [root@TFW-EVL06-LT /]# service tfw_httpd status Usage: /etc/init.d/tfw_httpd {start|stop|restart} [root@TFW-EVL06-LT /]# 可以看到,有一些服务控制脚本支持“status”参数,可以用“service [服务名] status”来查看;还有一些服务控制脚本不支持“status”参数,此时就只能凭经验判断了。 ============================================= “可以用TELNET、FTP举例,我的RH系统内有XINETD,也希望讲解下” --------------------------------------------- 在Redhat风格的发行版中,Telnet和FTP一版不是独立服务,而是被“超级服务器”XINETD托管。 XINETD是一个独立服务,和前述服务无异。它的控制脚本是“/etc/rc.d/init.d/xinetd”。 ============================================= “读哪个文件来判断服务的设置” --------------------------------------------- 不同的独立服务一般都拥有自己的配置文件。 典型情况下,“/etc/samba/smb.conf”是Windows网络邻居服务的主要配置文件,“/etc/ssh/sshd_config”是安全隧道服务器端的主要配置文件。 在我的计算机上,“/ext/prog/c/Apache/Httpd.EverestLinux-0.6-tb20090422/conf/”下的文件就是Apache-Httpd服务的主要配置文件。 在我曾经用过的Redhat系发行版Magic Linux 2.0中,Telnet和FTP等非独立服务的端口等配置信息出现在XINETD的配置文件中;而我现在所用的发行版Everest Linux 0.6虽然仍是Redhat系,Telnet和FTP的端口信息已经移到其各自的配置文件中。
五、Linux命令行怎么登录ftp?
Linux命令行登录FTP服务器和在WINDOWS上面是一样的: ftp user@domain 如果服务器没有域名的话,就直接写IP地址ftp user@10.0.0.1,然后根据提示输入用户对应的密码,再摁回车键,就能够登录到FTP服务器了。在Linux命令行,还可以通过脚本的方式自动登录FTP服务器,并且传送件实现自动化的操作。
热点信息
-
在Python中,要查看函数的用法,可以使用以下方法: 1. 使用内置函数help():在Python交互式环境中,可以直接输入help(函数名)来获取函数的帮助文档。例如,...
-
一、java 连接数据库 在当今信息时代,Java 是一种广泛应用的编程语言,尤其在与数据库进行交互的过程中发挥着重要作用。无论是在企业级应用开发还是...
-
一、idea连接mysql数据库 php connect_error) { die("连接失败: " . $conn->connect_error);}echo "成功连接到MySQL数据库!";// 关闭连接$conn->close();?> 二、idea连接mysql数据库连...
-
要在Python中安装modbus-tk库,您可以按照以下步骤进行操作: 1. 确保您已经安装了Python解释器。您可以从Python官方网站(https://www.python.org)下载和安装最新版本...