Commands: $ logname  to check present working user. User2 $ clear


Creating archive file and compressing



Download 122.5 Kb.
Page9/17
Date25.10.2023
Size122.5 Kb.
#62396
1   ...   5   6   7   8   9   10   11   12   ...   17
Unix Commands
Creating archive file and compressing

We can create archive a file and compress it. For doing both actions we use tar command with –czvf option.
Syn: $ tar –czvf [userdfined name.tar.gz] [directory name]
Ex: $ tar –czvf myarchive.tar.gz .  it will archive and compress the present working directory file system and name as myarchive.tar.gz
$ tar _czvf myarchive1.tar.gz x  x directory file system will be archived and compressed.

  • Uncompressing and Extracting archive file

By using tar command with –xzvf option we can uncompress and extract the archive file.
Syn: $ tar –xzvf [archive file name.tar.gz]



  • FTP (File Transfer Protocol)

File Transfer Protocol (FTP) is a network protocol used to copy a file from one computer to another over the Internet or LAN. FTP follows a client-server architecture which utilizes separate control and data connections between the ftp client and server.
To connect to FTP server enter ftp command in user mode. Now $ prompt changes to ftp prompt there open the server connection by using ip address and password.
Syn: $ ftp
ftp > open 192.14.35.76
Password: ********
To close the server connections close command is used.
ftp> close
237 goodbye
To come out from ftp to $ prompt bye command is used.
ftp> bye
$-
Commands used in ftp
ftp> verbose  Verbose mode gets off.
ftp> pwd  To display server’s current working directory
ftp> lcd  To display client’s current working directory.
ftp> ls  To display server’s directory contents.
ftp>dir  To display server’s directory contents.
ftp> mkdir [dir name]  To create a directory on server.
ftp> cd [dir name]  To change a directory on server.
ftp> rmdir [dir name]  To delete a directory from server.
ftp> delete [file name]  To delete file on server.
ftp> mdelte file1 file2..  To delete multiple files on server.
ftp> binary  To set the transfer mode as binary
ftp> put [filename]  To upload the file
ftp> mput file1 file2..  To upload multiple files
ftp> mput *.cpp  To upload all the files with extension .cpp
ftp> get [file name]  To download the file
ftp> mget *.cpp  To download the multiple files with extension .cpp.
ftp> disconnect  To disconnect from server.
ftp> quit  To quit from ftp prompt
ftp> bye  disconnecting from server and quit from ftp prompt.
ncftp  Anonymous ftp

Download 122.5 Kb.

Share with your friends:
1   ...   5   6   7   8   9   10   11   12   ...   17




The database is protected by copyright ©ininet.org 2024
send message

    Main page