Skip to main content

How to use FTP from a command line in widows effectively?

 FTP is not an encrypted transmission, which means any data sent over it, including your username and password could be read by anyone who may intercept your transmission. If you're wanting a more secure transmission we suggest using SFTP.
Connect using FTP
To connect to another computer using FTP at the MS-DOS prompt, command line, or Linux shell type FTP and press enter. Once in FTP> Type:
open ftp.example.com
In the above example, you'd substitute example.com for the name of your domain you're wanting to connect to. In addition to the domain name the IP address of the computer you're trying to connected to can also be typed typed in, for example, open 192.168.1.12.
Once connected you will be asked for a username and password. If these are entered properly you'll be successfully connected to the server where you can browse the files, send files, or receive files depending on your rights. Some servers may also allow anonymous logins you can connect to these computers using guest or e-mail address.
Send and receive a file in FTP
To get files from the server onto your own computer use the get command as shown in the below example. In this example you'd get the file myfile.htm.
Tip: If you want to get more than one file use mget and wildcards, for example, if you wanted to get all files that end with .htm you could type mget *.htm. Finally, if you do not want to be prompted as each file is being sent make sure to type prompt to disable prompting.
get myfile.htm
To send a file from your computer to the computer you are connected to assuming you have the rights use the send command as shown in the below example. In this example we're sending the myfile.htm to the directory we're currently in.
send myfile.htm
It is important to realize that the files being sent must be in your local working directory. In other words the directory you were in when you typed the FTP command. If you want to change to the directory that contains your files use the lcd command. For example, on Windows you'd type lcd c:\windows to set the local directory to the Windows directory.
FTP Commands
Depending upon the version of FTP and the operating system being used, each of the below commands may or may not work. Typing -help or a ? will list the commands available to you. Below is a general description of FTP commands available in the Windows command line FTP command.


ls: directory listing equivalent to dir.
ls -l: long directory listing, more detail.
pwd: display the name of current directory.
cd: change directory.
lcd: change the local current directory.
get: to download the file from the FTP server.
put: to transfer file and place it on the FTP server.
mget: to download multiple files from the FTP server.
mput: to transfer multiple files to the FTP server.
prompt: to turn on/off interactive mode.
binary: to turn on binary mode.
ascii: to turn on ascii mode.
delete: to turn a file on FTP server.
status: to display how the current FTP session is configured.
mkdir: to make directory on FTP server.
quit/close/bye/disconnect: to disconnect from the FTP server.


CommandInformation
!Using this command you will have the capability of toggling back and forth between the operating system and ftp. Once back in the operating system, typing exit will take you back to the FTP command line.
?Access the Help screen.
appendAppend text to a local file.
asciiSwitch to ASCII transfer mode
bellTurns bell mode on or off.
binarySwitches to binary transfer mode.
byeExits from FTP.
cdChanges directory.
closeExits from FTP.
deleteDeletes a file.
debugSets debugging on or off.
dirLists files if connected.

dir -C = Will list the files in wide format.
dir -1 = Lists the files in bare format in alphabetic order
dir -r = Lists directory in reverse alphabetic order.
dir -R = Lists all files in current directory and sub directories.
dir -S = Lists files in bare format in alphabetic order.
disconnectExits from FTP.
getGet file from the computer connected to.
globSets globbing on or off. When turned off the file name in the put and get commands is taken literally and wildcards will not be looked at.
hashSets hash mark printing on or off. When turned on for each 1024 bytes of data received a hash-mark (#) is displayed.
helpAccess the Help screen and displays information about command if command typed after help.
lcdDisplays local directory if typed alone or if path typed after lcd will change local directory.
literalSends a literal command to the connected computer with an expected one line response.
lsLists files of the remotely connected computer.
mdeleteMultiple delete.
mdirLists contents of multiple remote directories.
mgetGet multiple files.
mkdirMake directory.
mlsLists contents of multiple remote directories.
mputSent multiple files
openOpens address.
promptEnables or disables the prompt.
putSend one file
pwdPrint working directory
quitExits from FTP.
quoteSame as the literal command.
recvReceive file.
remotehelpGet help from remote server.
renameRenames a file.
rmdirRemoves a directory on the remote computer.
sendSend single file.
statusShows status of currently enabled and disabled options
traceToggles packet tracing.
TypeSet file transfer type.
userSend new user information.
verboseSets verbose on or off.

Comments

Popular posts from this blog

Oracle Import getting stuck Processing object type SCHEMA_EXPORT/

Oracle Import getting stuck Processing object type SCHEMA_EXPORT/ /database1/rdbm6/export> tail -200f impdp_D.SPORTS_03192012.log ;;; Import: Release 11.2.0.2.0 - Production on Mon Mar 19 15:34:10 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYS"."SYS_IMPORT_FULL_02" successfully loaded/unloaded Starting "SYS"."SYS_IMPORT_FULL_02":  "/******** AS SYSDBA" REMAP_SCHEMA=SPORTS:SPORTS DIRECTORY=dpump_dir DUMPFILE=expdp_D.SPORTS_02282012.dmp LOGFILE = impdp_D.SPORTS_03192012.log REMAP_TABLESPACE = SPORTS_DATA_TS:SPORTS_DATA_TS , SPORTS_INDEX_TS:SPORTS_INDEX_TS Processing object type SCHEMA_EXPORT/USER ORA-31684: Object type USER:"SPORTS" already exists Processing object type SCHEMA_EXPORT/ROLE_GRANT Proc

ORA-06550, WMSYS.LT_EXPORT_PKG.schema_info_exp

When you do full database export it fails will following errors as below. Export: Release 11.2.0.1.0 - Production on Mon Sep 30 12:04:38 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYS"."SYS_EXPORT_SCHEMA_01":  /******** AS SYSDBA schemas=user1 directory=data_pump_dir dumpfile=user1.dmp logfile=user1.log Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 0 KB Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE ORA-39127: unexpected error from call to export_string :=WMSYS.LT_EXPORT_PKG.schema_info_exp('user1&

How to make the email Address Dummy in Oracle Database?

How to make the email Address Dummy in Oracle Database? Query to make the email Address as dummy, update <tablename> set <Columnname> = '@' || <Columnname> where <Columnname>  is not null; Query to Remove the email Address as dummy, update <tablename> set <Columnname>= substr(<Columnname>,2,length(<Columnname>)) where <Columnname> is not null;