Archive and Transfer Files Flashcards
1
Q
What is the command to compress a file using tar?
A
tar cvf file
2
Q
What is the command to un-compress a file using tar?
A
tar xvf file.tar
3
Q
How can you use the command gzip?
A
gzip - compresses
gzip -d - un-compresses
You can use gzip to recompress a file already compressed by tar (file.tar.gzip)
4
Q
What are the steps to setup/install FTP for an FTP server?
A
- yum install vsftpd
- vim /etc/vsftpd/vsftpd.conf
- Make the following line changes
## Uncomment ##
anonymous_enable=NO
## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES
## Enter your welcome message - optional ##
ftpd_banner=Welcome to company’s ftp server
## Add at the end of this file ##
use_localtime=YES - systemctl start vsftpd
- systemctl enable vsftpd
- systemctl stop firewalld (i would never do this)
5
Q
How do you install/setup FTP on a client server?
A
- yum install ftp
- su - user
- touch ftp file
6
Q
What is the command to transfer a file to an FTP server?
A
ftp 192.168.1.x
Enter username and Password
bin
hash
put ftpfile
bye
7
Q
What is the command to transfer a file to another server using scp?
A
scp file user@192.168.1.x:/home/user