About the command line file copy of Linux operating system

Time:2022-4-3

aboutLinuxoperating systemofCommand line file copy

cause:The service cannot be used due to the expiration of the dongle secret key of the server. The secret key file in the server needs to be sent to the authorized personnel. I thought it was very easy. Open the server and click send on the graphical interface. Unexpectedly, the server interface is the command line interface. This eliminates the method of sending files directly from the server (for security reasons, of course), which can only be copied.

 

1、 Get fingerprint file

1.Run the following command to obtain the fingerprint of the machine and the generated file.c2vand.fingerprintCopy the document for the company to provide authorization

docker exec -it license-ca bash             #Enter container

cd /configs

/license-bin/cactls -action fp2file

exit # Exit container

The third step will generate two files named0000000000.c2vand0000000000.fingerprint

Give these two files to the authorized personnel to obtain authorization_.lic, client_Sxxx.licandclient_Sxxx.pemThese three documents.

 

IICopy files to hard disk

(I’m looking at a copy of the author)Copyright notice: This article isCSDNBlogger “kan2016“Original articles, followCC 4.0 BY-SACopyright agreement, please attach the original source link and this statement for reprint.

Original link:https://blog.csdn.net/kan2016/article/details/94457258

 

1.obtainrootAccess and enter the password:            

sudo su

 

2.seeuWhether the disk is recognized:

fdisk -l

 

3.seeuDisc position, e.g/dev/sdb4

 

4.Input mountuDial command and enter:

mount /dev/sdb4 /mnt  

report errors:mount: /mnt: Unknown file system type“exfat”.

terms of settlement:

sudo apt-get install exfat-utils

 

5.get intouDisk directory:

cd /mnt

6.No entryuView the file directory in the disk:

 

ls /mnt

7.Copy desktop files toUPacking path:

 

 cp ~/Desktop/Edge /mnt

If it is a copy folder:

 

cp -r ~/Desktop/Edge  /mnt

8.Check whether the copy is successful: (same as)6)         

 

9.sign outuDisk:

umount  /mnt  (I did this with the author and found the hintnot mounted, I found it on the InternetThe partition is not formatted, you need touThe disk partition is OK. For itselfLinuxI’m not familiar with it. Who knows what a grid isuIf the disk is gone or the server is gone, the risk is too great. Just give up this methodFinally, I putuWhen the disk is pulled out, there are no new files, so we can only find another way)

 

3、 Through another graphical interface computer, it can be obtained through LAN command

Original address:https://blog.csdn.net/a13526758473/article/details/54999507

Author:You can’t lose your hobbies

The specific operations are as follows:
1. In LANGraphical interfaceThe computer needs to be installedsshServices,(network required)I believe most people have already installed it. If not, install it in the following way:

Command line:sudo apt-get install ssh

2.Copy local files to the target machine

scp Target user name of the file to be transferred@Target machineIPAddress: the location where the file will be stored

eg.

scp test2.mp3 [email protected]:/home/nvidia/code

 

3.Assign the file in the target machine to the local machine

scp User name of the target machine@Target machineIPAddress: location of the fileThe location where the file will be stored on this machine

eg.

scp [email protected]:/home/nvidia/code/videotest/makefile ./

4.be careful
If the target machine is set with a password, you will be prompted for the password at the end of the command line. This is the password corresponding to the user name of the target machine.
If you need to transfer a folder, you need to use scp -rCommand. besides,scpThere are other orders.

Recommended Today

About interpersonal relationships

Not long ago, a classmate told me that his interpersonal relationship was very poor since he was a child. Few people in school played well. Usually he was alone. He had long recognized that this situation was bad, but he was also used to it.   But now that I have graduated, I am about […]