Hi,
compare two .dat files and difference will be moved into separate file.if anybody having code for this please send asap. using diff command, i don't know how to write shell programming.
and my first file is like this including Header and trailer
10Ç20060323Ç01(Header)
01ÇIÇbabuÇ3000
01ÇIÇbaluÇ4000... (1 Reply)
Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB.
The weird fact is that the BACKUP folder was 2 GB more than the original one!
... (1 Reply)
Hi,
I have a .txt file which has to be compared with a folder and print the difference to some other .txt file.
I did try with the diff command..i mean
diff /tmp/aaa/bbb.txt /space/aaa/bbb/
/***bbb.txt contains all the files names which may or may not exist in the folder bbb..so i need... (2 Replies)
Hi
I have two files in unix. I need to compare two files and print the differed lines in other file
Eg
file1
1111
2222
3333
file2
1111
2222
3333
4444
5555
newfile
4444
5555
Thanks In advance (3 Replies)
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
I have a 500 MB XML file from a FileMaker database export, it's formatted horribly (no line breaks at all). The node structure is basically
<FMPXMLRESULT>
<METADATA>
<FIELD att="............." id="..."/>
</METADATA>
<RESULTSET FOUND="1763457">
<ROW att="....." etc="....">
... (16 Replies)
Hi all
i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example:
file... (2 Replies)
Good morning all,
I have a problem that is one step beyond a standard awk compare.
I would like to compare three files which have several thousand records against a fourth file. All of them have a value in each row that is identical, and one value in each of those rows which may be duplicated... (1 Reply)
Hello, my first thread here.
I've been searching and fiddling around for about a week and I cannot find a solution.:confused:
I have been converting all of my home videos to HEVC and sometimes the files end up smaller and sometimes they don't. I am currently comparing all the video files... (5 Replies)
I have two files:
smw:/working/iso_testing # cat a
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm
aaa_base-13.2+git20140911.61c1681-1.3.i586.rpm
acpica-20140724-2.1.2.i586.rpm
test.rpm
smw:/working/iso_testing # cat b
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm... (12 Replies)
Discussion started by: jedlund21
12 Replies
LEARN ABOUT DEBIAN
virt-ls
virt-ls(1) Virtualization Support virt-ls(1)NAME
virt-ls - List files in a virtual machine
SYNOPSIS
virt-ls [--options] -d domname directory [directory ...]
virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]
Old style:
virt-ls [--options] domname directory
virt-ls [--options] disk.img [disk.img ...] directory
DESCRIPTION
"virt-ls" lists filenames, file sizes, checksums, extended attributes and more from a virtual machine or disk image.
Multiple directory names can be given, in which case the output from each is concatenated.
To list directories from a libvirt guest use the -d option to specify the name of the guest. For a disk image, use the -a option.
"virt-ls" can do many simple file listings. For more complicated cases you may need to use guestfish(1), or write a program directly to
the guestfs(3) API.
EXAMPLES
Get a list of all files and directories in a virtual machine:
virt-ls -R -d guest /
List all setuid or setgid programs in a Linux virtual machine:
virt-ls -lR -d guest / | grep '^- [42]'
List all public-writable directories in a Linux virtual machine:
virt-ls -lR -d guest / | grep '^d ...7'
List all Unix domain sockets in a Linux virtual machine:
virt-ls -lR -d guest / | grep '^s'
List all regular files with filenames ending in '.png':
virt-ls -lR -d guest / | grep -i '^-.*.png$'
To display files larger than 10MB in home directories:
virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'
Find everything modified in the last 7 days:
virt-ls -lR -d guest --time-days / | awk '$6 <= 7'
Find regular files modified in the last 24 hours:
virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'
DIFFERENCES IN SNAPSHOTS AND BACKING FILES
Find the differences between files in a guest and an earlier snapshot of the same guest.
virt-ls -lR -a snapshot.img / --uids --time-t > old
virt-ls -lR -a current.img / --uids --time-t > new
diff -u old new | less
The commands above won't find files where the content has changed but the metadata (eg. file size and modification date) is the same. To
do that, you need to add the --checksum parameter to both "virt-ls" commands. --checksum can be quite slow since it has to read and
compute a checksum of every regular file in the virtual machine.
OUTPUT MODES
"virt-ls" has four output modes, controlled by different combinations of the -l and -R options.
SIMPLE LISTING
A simple listing is like the ordinary ls(1) command:
$ virt-ls -d guest /
bin
boot
[etc.]
LONG LISTING
With the -l (--long) option, the output is like the "ls -l" command (more specifically, like the "guestfs_ll" function).
$ virt-ls -l -d guest /
total 204
dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin
dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot
[etc.]
Note that while this is useful for displaying a directory, do not try parsing this output in another program. Use "RECURSIVE LONG LISTING"
instead.
RECURSIVE LISTING
With the -R (--recursive) option, "virt-ls" lists the names of files and directories recursively:
$ virt-ls -R -d guest /tmp
foo
foo/bar
[etc.]
To generate this output, "virt-ls" runs the "guestfs_find0" function and converts "