Posts

Showing posts with the label Unix

Unix - Linux Command - FAQ

Windows: C:\Users\> hostname ABCDE000123   C:\Users\> wmic bios get serialnumber SerialNumber ABCD123 C:\>  ipconfig/flushdns Linux/Unix: $ uname -a Linux oam-ohs 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux   $ hostnamectl    Static hostname: oam-ohs          Icon name: computer-vm            Chassis: vm         Machine ID: adaf69d723c14f179ff541b6d37a350b            Boot ID: 6d090b2d2d104957a5ccfffe178b65ca     Virtualization: vmware   Operating System: Red Hat Enterprise Linux 8.2 (Ootpa)        CPE OS Name: cpe:/o:redhat:enterprise_linux:8.2:GA             Kernel: Linux 4.18.0-193.el8.x86_64       Architect...

UNIX - Basic Commands

Basic Directory Commands  mkdir  To create a new directory by an user in Unix    $mkdir dir_abc rmdir  To remove a directory from the file system  $rmdir  dir_abc pwd  To get the present working directory  pwd  is used to identify the present directory in which the user is working.  $ pwd <enter>  cd  To change from the present working directory  Changing from one directory to the other is done by the command cd   $cd /usr/ dir_abc /AP   mv  To rename the files  mv  is used to change the name of files and directories  $mv fileabc filexyz ls  The command ls  is used to list the files and directories which are available in that current working directory  $ls <enter> cp To copy the contents of one file into another file  $ cp file1 file2 Copies file1 to file2  rm  To delete a file  rm command is used for deleting unwanted files/directories...

Putty Commands - Provide full permission recursive

 Open PUTTY Terminal & type below commands: 1 sudo su - root Login with SUDO as ROOT access  2 cd /my/drive/hello/ Change directory to FCDB database 3 pwd Check current directory 4 ls -ltr List and check existence of new folder to be created 5 mkdir –m777 MYFOLDER Create New folder with respective country prefix letter & Change Permission in single command 6 chmod 777 /my/drive/hello/MYFOLDER Change permission to full 777 7 chmod -R 777 ./ Change full permission recursively to 777

PUTTY - The server's host key is not cached in the registry cache

Error: "The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. The server's rsa2 key fingerprint is: [SSH KEY FINGERPRINT] If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n) y" Answer: Simply run this command in your windows preferred terminal (cmd.exe etc) and agree to accept the host and store the cache: C:\Program Files (x86)\PuTTY\plink.exe -ssh [SSH USERNAME]@[SSH HOST] -P [SSH PORT] echo y | pscp -i /path/to/key/file user@remote:/tmp/file  . echo y | plink -i /path/to/key/file scripts.sh Usually you would hit “y” here, assuming the host key is correct, in order to store it in future connection.  The storage of this goes into the Registry under ...