- 浏览: 13634217 次
- 性别:
- 来自: 洛杉矶
文章分类
- 全部博客 (1994)
- Php / Pear / Mysql / Node.js (378)
- Javascript /Jquery / Bootstrap / Web (435)
- Phone / IOS / Objective-C / Swift (137)
- Ubuntu / Mac / Github / Aptana / Nginx / Shell / Linux (335)
- Perl / Koha / Ruby / Markdown (8)
- Java / Jsp (12)
- Python 2 / Wxpython (25)
- Codeigniter / CakePHP (32)
- Div / Css / XML / HTML5 (179)
- WP / Joomla! / Magento / Shopify / Drupal / Moodle / Zimbra (275)
- Apache / VPN / Software (31)
- AS3.0/2.0 / Flex / Flash (45)
- Smarty (6)
- SEO (24)
- Google / Facebook / Pinterest / SNS (80)
- Tools (22)
最新评论
-
1455975567:
xuezhongyu01 写道wocan23 写道我想问下那个 ...
Mysql: LBS实现查找附近的人 (两经纬度之间的距离) -
xuezhongyu01:
wocan23 写道我想问下那个111.1是怎么得来的我也看不 ...
Mysql: LBS实现查找附近的人 (两经纬度之间的距离) -
18335864773:
试试 pageoffice 在线打开 PDF 文件吧. pag ...
jquery在线预览PDF文件,打开PDF文件 -
青春依旧:
opacity: 0.5; 个人喜欢这种方式!关于其他css特 ...
css透明度的设置 (兼容所有浏览器) -
July01:
推荐用StratoIO打印控件,浏览器和系统的兼容性都很好,而 ...
搞定网页打印自动分页问题
You can use FTP to transfer files from your Mac OS X Snow Leopard computer with an FTP server by using the command-line interface (CLI); to use the CLI, open a Terminal, or shell, session. To use a Terminal session, double -click the Terminal icon in the Utilities folder inside the Applications folder. When you open a Terminal session, you’re presented with a window that accepts text commands. You’ll see a prompt that consists of your computer’s name and the folder that you’re currently in, followed by your user ID. It’s at this prompt where you type various FTP commands.
After you’re in the Terminal session, you’ll use a series of commands to connect to another computer, move in and out of folders, and transfer files. Following is a list of the basic commands that you need to use FTP as well as a brief description of what each command does.
-
ftp : This command starts the FTP command line interface session. You can tell that you’re in the FTP client application when you see ftp> as your command prompt. This is where you type all other FTP commands to do things.
-
open : This command is used to start your connection to another computer. Type this command followed by the IP address of the FTP server that you want to connect to.
-
ls : Use this command to see a listing of all files and folders in the current folder on the FTP server.
-
cd : This command allows you to change the folder that you’re in. Type cd <folder> (where folder is a specific folder name) to move into a subfolder on the FTP server. Type cd .. (that’s c, d, space, and two periods) to go back out a folder level.
-
lcd : This command acts exactly like cd except that it changes the folder that you’re currently in on your local system, not the FTP server. Use this command to put yourself in the folder on the local drive that you want to transfer files to and from.
-
bin : Type this command to get in binary mode to transfer files that aren’t plain-text files. (Always use binary mode unless you’re specifically transferring plain-text files.)
-
ascii : This command puts you in ASCII mode for transferring text files.
-
get or mget : To retrieve a single file, use the get command followed by the filename of the file that you want to retrieve. If you want to get multiple files at one time, use the mget command followed by a filename, possibly containing * and/or ? as wildcards.
-
put or mput : To send a single file, use the put command followed by the filename to send a file to the FTP server. To send multiple files, use the mput command followed by a filename, possibly containing * and/or ? as wildcards.
-
quit : Use the quit command to end your FTP session.
To end a Terminal session and exit Terminal at any time, press Command+Q. Terminal prompts you for confirmation if necessary.
Using these commands will enable you to exchange files with an FTP server. Here’s an example of how to use these commands within the Terminal window:
-
Type ftp to get into FTP mode.
-
Type open <ip address> (where ip address is the server’s network IP address) to open your connection to the FTP server.
-
At this point, you’re asked for a username and password.
For many FTP servers, using the username anonymous and your e-mail address as the password is enough to get you logged in. Some sites even allow you to log in without any username or password at all. On secure sites, however, you must use an assigned username and password provided by the administrator of that particular server.
-
Type lcd <folder> (where folder is a specific folder name) to change into the folder on your local drive that you want files to come to or from.
-
Type the ls and cd commands to place yourself into the desired folder on the FTP server.
-
Type the ascii or bin command to set your file transfer mode to ASCII or binary, respectively.
This is important because choosing the wrong type will likely cause the transfer to fail. Unless it’s a plain-text file, always use binary mode.
-
Type the get , mget , put , and mput commands to send or receive the desired files.
-
Type the quit command to close the connection and exit the FTP session.
The FTP site of the Computer Science department at CSU requires the user to use sftp, the secure version of FTP. Just type sftp instead of ftp, when you are using FTP in a terminal window.
EXAMPLES
ftp abc.xyz.edu
This command will attempt to connect to the ftp server at abc.xyz.edu. If it succeeds, it will ask you to log in using a username and password. Public ftp servers often allow you to log in using the username "anonymous" and your email address as password. Once you are logged in you can get a list of the available ftp commands using the help function:
ftp> help
This lists the commands that you can use to show the directory contents, transfer files, and delete files.
ftp> ls
This command prints the names of the files and subdirectories in the current directory on the remote computer.
ftp> cd customers
This command changes the current directory to the subdirecotry "customers", if it exists.
ftp> cd ..
Changes the current directory to the parent direcotry.
ftp> lcd images
Changes the current directory on the local computer to "images", if it exists.
ftp> ascii
Changes to "ascii" mode for transferring text files.
ftp> binary
Changes to "binary" mode for transferring all files that are not text files.
ftp> get image1.jpg
Downloads the file image1.jpg from the remote computer to the local computer. Warning: If there already is file with the same name it will be overwritten.
ftp> put image2.jpg
Uploads the file image2.jpg from the local computer to the remote computer. Warning: If there already is file with the same name it will be overwritten.
ftp> !ls
A '!' in front will execute the specified command on the local computer. So '!ls' lists the file names and directory names of the current directory on the local computer.
ftp> mget *.jpg
With mget you can download multiple images. This command downloads all files that end with ".jgp".
ftp> mput *.jpg
Uploads all files that end with ".jgp".
ftp> mdelete *.jpg
Deletes all files that end with ".jgp".
ftp> prompt
Turns iteractive mode on or off so that commands on multiple files are executed without user confirmation.
ftp> quit
Exits the ftp program.
来源:http://linux.about.com/od/commands/l/blcmdl1_ftp.htm
Common FTP Commands
?
to request help or information about the FTP commands
ascii to set the mode of file transfer to ASCII (this is the default and transmits seven bits per character)
binary to set the mode of file transfer to binary (the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files)
bye to exit the FTP environment (same as quit)
cd to change directory on the remote machine
close
to terminate a connection with another computer
close brubeck
closes the current FTP connection with brubeck, but still leaves you within the FTP environment.
delete
to delete (remove) a file in the current remote directory (same as rm in UNIX)
get
to copy one file from the remote machine to the local machine
get ABC DEF
copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory.
get ABC
copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory.
help to request a list of all available FTP commands
lcd
to change directory on your local machine (same as UNIX cd)
ls
to list the names of the files in the current remote directory
mkdir
to make a new directory within the current remote directory
mget
to copy multiple files from the remote machine to the local machine; you are prompted for a y/n answer before transferring each file
mget *
copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, *.
mput
to copy multiple files from the local machine to the remote machine; you are prompted for a y/n answer before transferring each file
open
to open a connection with another computer
open brubeck
opens a new FTP connection with brubeck; you must enter a username and password for a brubeck account (unless it is to be an anonymous connection).
put
to copy one file from the local machine to the remote machine
pwd
to find out the pathname of the current directory on the remote machine
quit
to exit the FTP environment (same as bye)
rmdir
to to remove (delete) a directory in the current remote directory
发表评论
-
如何直接在github上预览html网页效果
2016-08-30 02:20 12634在github上托管的项目, 经常会存放一些demo的htm ... -
如何备份及恢复 Linux 文件权限
2016-08-26 02:29 962你可能听说或碰到过这样的事情:一个系统管理员菜鸟不小心输入” ... -
Linux: 近100个常用命令大全
2016-08-17 11:37 18261.ls [选项] [目录名 | 列出相关目录下的所有目录和 ... -
Linux: terminal 终端生存指南
2016-08-17 11:32 3468完全利用Linux终端处理日常工作并非易事,但其可行性却是不 ... -
Linux: 利用 Alpine 在命令行里访问 Gmail
2016-08-17 11:30 1382假如你是一个命令行爱好者,我很确信你会使用这个强大的工作环境 ... -
Linux: chmod 和 chown用法小结
2016-08-16 05:38 881chmod chmod指令是更 ... -
Linux: 系统文件权限总结
2016-08-16 05:39 746在 Linux 中最基本的 ... -
Linux: 系统结构详解
2016-08-16 05:38 818Linux系统一般有4个 ... -
开启Windows或者Mac OSX 本地服务器 (非安装第三方服务器软件)
2016-07-21 01:52 2125因为安全的原因,无法直接在浏览器中打开工程目录下的index ... -
Ubuntu: 安装 Sublime Text 2 或者 3 How to Install Sublime Text 2 or 3 in Ubuntu 15.0
2016-07-20 13:44 1015Sublime Text is a cross- ... -
用Vim编程——配置与技巧
2016-06-25 06:59 2079本文介绍如何用强大的文本编辑器 Vim编程。只要配置得当,效 ... -
无插件Vim编程技巧
2016-06-14 05:42 933相信大家看过《简明Vim教程》也玩了《Vim大冒险》 的游戏 ... -
Vimrc设置教程:A Good Vimrc (英文)
2016-06-14 05:33 1120How To Vimrc There is just o ... -
Linux Shell脚本入门教程系列之(十六) Shell输入输出重定向
2016-06-14 05:21 987本文是Linux Shell系列教程的第(十六)篇,更多 ... -
Linux Shell脚本入门教程系列之(十五) Shell函数简介
2016-06-14 05:19 975本文是Linux Shell脚本系列教程的第(十五)篇, ... -
Linux Shell脚本入门教程系列之(十四) Shell Select教程
2016-06-10 02:28 1054本文是Linux Shell脚本系列教程的第(十四)篇, ... -
Linux Shell脚本入门教程系列之(十三)Shell分支语句case … esac教程
2016-06-10 02:28 1900本文是Linux Shell脚本 ... -
Linux Shell脚本入门教程系列之(十二)Shell until循环
2016-06-10 02:26 1017本文是Linux Shell脚本系列教程的第(十二)篇, ... -
Linux Shell脚本入门教程系列之(十一)Shell while循环
2016-06-10 02:24 1133本文是Linux Shell脚本系列教程的第(十一)篇, ... -
Linux Shell脚本入门教程系列之(十)Shell for循环
2016-06-10 02:22 727本文是Linux Shell脚本系列教程的第(十)篇,更 ...
相关推荐
讲述Ubuntu操作系统的命令,便于查询。是linux开发不可缺少的工具。
True Basic语言的命令参考,详细介绍了True的所有语句,命令的用法。
SIMCom SIM900 的FTP和HTTP相关的AT指令。
Complete List Of Visual Basic Commands
Operating System Concepts and Basic Linux Commands 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,...
LINUX基本编程指令 UNIX/LINUX COMMAND REFERENCE
Ubuntu Linux 的命令大全
wiley.ubuntu.linux.toolbox.1000.plus.commands.for.ubuntu.and.debian.power.users.nov.2007.pdf
Basic_Linux_Commands
ubuntu_commands:常用的UBUNTU命令和脚本
路由器的基本命令 Router Basic Commands 路由器的基本配置及 CDP Router Basic Configurati on & CDP 路由协议(RIP & EGR P ) Routing Protocol(RIP & I GRP ) 访问控制列表实验 Access Control List 帧中继 ...
C#版Ftp软件源码 Class that store FTP Commands with parameters - use with FTP Queue 可以进行简单的Ftp操作(上传、下载),并支持右键菜单(新建文件夹、下载、重命名等) 支持拖拽的上传和下载
Basic Unix commands 1 clear :清空当前屏幕上的内容 2 pwd :输出当前工作目录的绝对路径 3 id【用户名】:查看用户的Uid、Gid和用户所属组群信息 4 cd 【目录】 :切换到指定的目录 5 cd 回到主目录; cd .. 回到...
FIBOCOM_L610_AT_Commands_User_Manual_FTP_V1.0.0.pdf
Basic Commands_vissim_vissim二次开发_vissimcom_源码.zip
Undocumented Cisco Commands Undocumented Cisco Commands Undocumented Cisco Commands Undocumented Cisco Commands Undocumented Cisco Commands Undocumented Cisco Commands Undocumented Cisco Commands ...
Basic Commands_vissim_vissim二次开发_vissimcom_源码.rar.rar
DMISBasicCommands
EC20 FTP相关AT指令手册,适用于EC2X,EG9X,EM05系列模块 EC20 FTP相关AT指令手册,适用于EC2X,EG9X,EM05系列模块