PSFTP- Compare file size


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers PSFTP- Compare file size
# 1  
Old 07-11-2011
PSFTP- Compare file size

Hi,

I'm using PSFTP to transfer files from one machine to a virtual machine with UBUNTU OS installed on it.
I'm trying to find a way to make sure the files that I'm uploading / downloading are being uploaded/ downloaded properly.
I want to compare the size of the local file and the remote file to ensure this is happening?
Does anyone know a simple way of doing this using PSFTP, that isn't manual??

Cheers
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare file size and then copy/overwrite

// Redhat I have this code working, but need to add one more qualification so that I don't overwrite the files. #!/bin/sh cd /P2/log/cerner_prod/millennium/archive/ for f in * do || continue #If this isn't a regular file, skip it. && continue #If a backup already... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

2. Shell Programming and Scripting

Compare size of one file with other file in Linux

Hi, I have 32 files for which I want to check size of each file withe other file and if size is same then some action. Any suggestion to write such script. Logic: have list of 32 files using loop first compare size of one file with remaining 31 , do same iteration for each file with... (4 Replies)
Discussion started by: hemantakhandare
4 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Is it possible to use PuTTY psftp.exe to move file from one directory to another?

Hello All, I am running a script (power shell) from my desktop (Windows). The script needs to sftp a file(using PuTTY psftp.exe ) from my desktop to a server(UNIX server). Then, as a second step, the script needs to move (or copy and delete) this file from one directory on the server (UNIX server)... (3 Replies)
Discussion started by: scampi
3 Replies

4. Shell Programming and Scripting

Script to Compare file size and delete the smaller

I am pretty new to scripting, so I appreciate your advice in advance. The problem: 100 directories each containing 2 files that have the same extension with random names. The only attribute that discriminates the files is size. I would like to write a script that compares the files for size... (6 Replies)
Discussion started by: JC_1
6 Replies

5. Shell Programming and Scripting

psftp: get all files info in a choosen file

Dear all, We are trying to get file information in a file from our sftp server with the program psftp. lcd d:\sftpInfo cd serverInfo ls *.* > qqqqq.txt After running the ls command, we see all files who are in the serverInfo directory on the screen. No error is showed. Our question is:... (3 Replies)
Discussion started by: ton2204
3 Replies

6. Shell Programming and Scripting

compare between files size

Hello i have file A created yesterday and file B created today thanks to help create script compare between 2 files according to size so if file B is less than 10% of file A i should have echo message with warning also check if file B exist or not. this should be run in loop for list of... (6 Replies)
Discussion started by: mogabr
6 Replies

7. Shell Programming and Scripting

to write a script to compare the file size in the current directory and previous dir

hi, i am new to this site. i want to write a script to compare the file size of the files in the current dir with the files in the previous directory. the files name will be same, but the filename format will be as xyzddddyymm.txt. the files will arrive with the month end date(i want to... (5 Replies)
Discussion started by: tweety
5 Replies

8. Shell Programming and Scripting

How to compare size of two file which is in one directory

I have two file in a Directory.I want a script which will compare the Size of Two file. Can Anyone Help me on this: linasplg11:/opt/dataout/kk/linasplg11 # cat size -rwxrwxrwx 1 root root 16658 Jan 8 13:58 lina_IP_SIP_1231325621210.xml -rwxr-xr-x 1 root root 16672 Jan 8 14:30... (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies

9. Shell Programming and Scripting

compare file size from a output file from a script

Hi guys, firstly I'm working on SunOS 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V240 I've made a script to compress two directory and then send them to an other server via ftp. This is working very well. Inside theis script I decide to log usefull data for troubleshooting in case of... (7 Replies)
Discussion started by: moustik
7 Replies

10. Shell Programming and Scripting

How to compare file size after ftp?

Is possible if I want to campare file size on source and destination after ftp transfer? If anybody know, please explain to me. (1 Reply)
Discussion started by: icemania
1 Replies
Login or Register to Ask a Question
virt-tar(1)						      Virtualization Support						       virt-tar(1)

NAME
virt-tar - Extract or upload files to a virtual machine SYNOPSIS
virt-tar [--options] -x domname directory tarball virt-tar [--options] -u domname tarball directory virt-tar [--options] disk.img [disk.img ...] -x directory tarball virt-tar [--options] disk.img [disk.img ...] -u tarball directory OBSOLETE
This tool is obsolete. Use virt-copy-in(1), virt-copy-out(1), virt-tar-in(1), virt-tar-out(1) as replacements. EXAMPLES
Download "/home" from the VM into a local tarball: virt-tar -x domname /home home.tar virt-tar -zx domname /home home.tar.gz Upload a local tarball and unpack it inside "/tmp" in the VM: virt-tar -u domname uploadstuff.tar /tmp virt-tar -zu domname uploadstuff.tar.gz /tmp WARNING
You must not use "virt-tar" with the -u option (upload) on live virtual machines. If you do this, you risk disk corruption in the VM. "virt-tar" tries to stop you from doing this, but doesn't catch all cases. You can use -x (extract) on live virtual machines, but you might get inconsistent results or errors if there is filesystem activity inside the VM. If the live VM is synched and quiescent, then "virt-tar" will usually work, but the only way to guarantee consistent results is if the virtual machine is shut down. DESCRIPTION
"virt-tar" is a general purpose archive tool for downloading and uploading parts of a guest filesystem. There are many possibilities: making backups, uploading data files, snooping on guest activity, fixing or customizing guests, etc. If you want to just view a single file, use virt-cat(1). If you just want to edit a single file, use virt-edit(1). For more complex cases you should look at the guestfish(1) tool. There are two modes of operation: -x (eXtract) downloads a directory and its contents (recursively) from the virtual machine into a local tarball. -u uploads from a local tarball, unpacking it into a directory inside the virtual machine. You cannot use these two options together. In addition, you may need to use the -z (gZip) option to enable compression. When uploading, you have to specify -z if the upload file is compressed because virt-tar won't detect this on its own. "virt-tar" can only handle tar (optionally gzipped) format tarballs. For example it cannot do PKZip files or bzip2 compression. If you want that then you'll have to rebuild the tarballs yourself. (This is a limitation of the libguestfs(3) API). OPTIONS
--help Display brief help. --version Display version number and exit. -c URI --connect URI If using libvirt, connect to the given URI. If omitted, then we connect to the default libvirt hypervisor. If you specify guest block devices directly, then libvirt is not used at all. --format raw Specify the format of disk images given on the command line. If this is omitted then the format is autodetected from the content of the disk image. If disk images are requested from libvirt, then this program asks libvirt for this information. In this case, the value of the format parameter is ignored. If working with untrusted raw-format guest disk images, you should ensure the format is always specified. -x --extract --download -u --upload Use -x to extract (download) a directory from a virtual machine to a local tarball. Use -u to upload and unpack from a local tarball into a virtual machine. Please read the "WARNING" section above before using this option. You must specify exactly one of these options. -z --gzip Specify that the input or output tarball is gzip-compressed. SHELL QUOTING
Libvirt guest names can contain arbitrary characters, some of which have meaning to the shell such as "#" and space. You may need to quote or escape these characters on the command line. See the shell manual page sh(1) for details. SEE ALSO
guestfs(3), guestfish(1), virt-cat(1), virt-edit(1), virt-copy-in(1), virt-copy-out(1), virt-tar-in(1), virt-tar-out(1), Sys::Guestfs(3), Sys::Guestfs::Lib(3), Sys::Virt(3), <http://libguestfs.org/>. AUTHOR
Richard W.M. Jones <http://people.redhat.com/~rjones/> COPYRIGHT
Copyright (C) 2009 Red Hat Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. libguestfs-1.18.1 2013-12-07 virt-tar(1)