LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 07-14-2018, 02:00 PM   #1
jettwa2001
Member
 
Registered: Dec 2007
Posts: 54

Rep: Reputation: 16
Smile KVM Image clone


Hi Guy's,

I need to write a script that will do the following copy kvm image from one hypervisor to another.

one of the things that I need in the middle is to get the last dir number in the image dir.

for e.g

test-vrt-012
test-vrt-013
test-vrt-014

How do I tell grep to give me only the last dir in the directory in this case should be test-vrt-014

Thx

in advancved
 
Old 07-14-2018, 02:07 PM   #2
jettwa2001
Member
 
Registered: Dec 2007
Posts: 54

Original Poster
Rep: Reputation: 16
oops sorry guy's figure it out with tail -1

Thx
 
Old 07-19-2018, 01:17 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Thanks for the update and solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virt-clone creating a truncated disk? (KVM on CentOS 7) tbblake Linux - Virtualization and Cloud 6 03-19-2015 06:35 AM
How to clone an image on kvm using clonezilla sindh Linux - Newbie 7 09-04-2014 04:03 PM
Snapshot & Clone on KVM benelux.j Linux - Virtualization and Cloud 3 12-03-2012 02:37 AM
kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6 rajivdp Linux - Virtualization and Cloud 2 09-19-2011 11:23 AM
clonezilla clone disk to image, when restore from image to destination hdd problem. hocheetiong Linux - Newbie 3 05-06-2008 07:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration