Posts

Showing posts from March, 2016

sftp mget get -r lcd lpwd !

sftp connection example sftp -oIdentifyFile=file.id user@sftp.name.com:/path/path -i   identity_file Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to  ssh . Downloads files recursively including subfolders get -r * sftp> lpwd Local working directory: / sftp> put local.profile Uploading local.profile to /tecmint/local.profile sftp> put local.profile Uploading local.profile to /tecmint/local.profile sftp> mget *.xls sftp> lmkdir Documents The ‘ ! ‘ command drop us in local shell from where we can execute Linux commands. Type ‘ exit ‘ command where we can see  sftp>  prompt return. sftp> ! [root@sftp ~]# exit Shell exited with status 1 sftp>

facter

ubuntu@ubuntu:~/Documents/Puppet$ facter ipaddress_eth0 192.168.40.128 192.168.40.128 ubuntu@ubuntu:~/Documents/Puppet$ facter architecture => i386 augeasversion => 1.2.0 blockdevice_fd0_size => 0 blockdevice_sda_model => VMware Virtual S blockdevice_sda_size => 17179869184 blockdevice_sda_vendor => VMware, blockdevice_sr0_model => VMware SATA CD00 blockdevice_sr0_size => 1073741312 blockdevice_sr0_vendor => NECVMWar blockdevice_sr1_model => VMware SATA CD01 blockdevice_sr1_size => 1073741312 blockdevice_sr1_vendor => NECVMWar blockdevices => fd0,sda,sr0,sr1 domain => localdomain facterversion => 1.7.5 filesystems => ext2,ext3,ext4,vfat fqdn => ubuntu.localdomain hardwareisa => i686 hardwaremodel => i686 hostname => ubuntu id => ubuntu interfaces => eth0,lo ipaddress => 192.168.40.128 ipaddress_eth0 => 192.168.40.128 ipaddress_lo => 127.0.0.1 is_virt

dhclient -r | renew ip command

Linux renew ip command The  -r  flag explicitly releases the current lease, and once the lease has been released, the client exits. For example, open terminal and type the command: $ sudo dhclient -r Now obtain fresh IP: $ sudo dhclient