FTP, cURL and Linux Intro
FTP(FIle Transfer Protocol)
The FTP protocol consists of two connections
The control connection is run on port 23 and it authorizers and authenticates the client and the server
after both the client and server are authenticated,
The data ia sent over port 21 on the data connection
After the file is uploaded or any other file operation is performed the data connection is closed
After the data connection is closed, the control connection is closecd
CURL
- Control connection
- Data Connection
The control connection is run on port 23 and it authorizers and authenticates the client and the server
after both the client and server are authenticated,
The data ia sent over port 21 on the data connection
CURL stands for Connect URL (Uniform Resource Locator).It is used my most Operations now-a-dayssince it s simplicity, reliabily and multitasking.
The few operating systems which have support of installing CURL are Windows 10, Windows11 ,Linux,etc.
Let us take an example to see how CURL works
Steps:
Some Linux OS Basics:
Miscellaneous Points:
/, /root, /bin, /sbin, /usr, /var, /tmp, /spool, /etc
Steps:
$x=curl_init();// Creates a CURL object with initialization parameters
curl_open($x,http://thewebdesk,.blogspot.com"); // //Opens a connection to the server
curl_set_opts();//configuraion and initializing options fo the HTTP request and response
curl_return_transfer = true; ("To return the updated web page or of it is text, output the server's response on the client's console
curl_close(); //closes the CURL session
To put multiple files in the file server, use
wput server_URL
To download multiple files from the file server in:wget server_URL
To find the intermediate routers in the path from the client to the server, use
traceroute command
Usage is - traceroute "http://thewebdesk.blogspot.com"
To get the statistics of the network use the
netstat command
It will show all active connections for the server including the following information:-- port_number
- ip_address
- domain_name
- protocol_name
- ipv6_address
- The number of intermediate routersand their ipv4 addresses,
- df:- returns the disk memory which is free
- du:-Returns the disk cmemory which is currently in use
- ls:- returns the list of fikles in the current dierectory
- ls -a:-Returns the list of file sin the current directory incliuding incliudong hidden files
sudo apt-get install <package_name>
Here,sudo will make this command to run with suepruser privileges and will ask for the superuser's username and password.
If the username and password are true,it will download the package names into "
Miscellaneous Points:
- The "." represents the path of the current file or directory
- The ".." represent sthe path of the parent directory
- The root directory in a LInux OS is /
- IT contaoins the followingf subdierectories:
Comments
Post a Comment