Sponsored Content
Top Forums Shell Programming and Scripting compare file size from a output file from a script Post 302144304 by moustik on Wednesday 7th of November 2007 08:15:40 AM
Old 11-07-2007
Just to complet. One of the data came from FTP so I have to go accross a file where I push some useful input ls -l and dir result.

What I'm not arriving to do is to read the data and compare it.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Advanced & Expert Users

Shell Script to compare xml files and print output to a file

All, PLease can you help me with a shell script which can compare two xml files and print the difference to a output file. I have attached one such file for you reference. <Group> <Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies

4. Solaris

Script fails when generated output file reaches a particular size

Hi All, New to unix. Here is the problem. Running a script that extracts data from hyperion essbase and generates a file in unix. This script fails most of the times with a very low success rate. The data has increased a lot in the last few months resulting in the file being more than 2 gb. ... (2 Replies)
Discussion started by: noufalshaw
2 Replies

5. UNIX for Dummies Questions & Answers

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... (0 Replies)
Discussion started by: sessie
0 Replies

6. Shell Programming and Scripting

Output after a perl script gives a file with size zero.

Hi, I have a unix shell script which generates a flat file after connecting to Teradata servers to fetch tables and views and also picks up modified unix scripts from the specified paths. Later on the script calls a perl script to assign a value based on the type of object in the flat file which... (2 Replies)
Discussion started by: yohasini
2 Replies

7. 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

8. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

9. 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

10. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
RESTOREVOL(1)						       AFS Command Reference						     RESTOREVOL(1)

NAME
restorevol - Restore a volume from vos dump to the local file system SYNOPSIS
restorevol [-file <dump file>] [-dir <restore dir> ] [-extension <name extension>] [-mountpoint <mount point root>] [-umask <mode mask>] [-verbose] [-help] DESCRIPTION
restorevol takes an AFS volume in the format produced by vos dump and restores it to the local file system. Normally, the contents of a volume are maintained by the AFS File Server in an opaque format and copying a volume's raw data does not make it easily accessible. This utility will produce a directory tree that is equivalent to that seen via an AFS client, but without preserving the AFS-specific Access Control Lists (ACLs). It's primary use is to recover data from a volume dump or backup and make it available via a filesystem other than AFS. The dump output will read from standard input, or from a file if -file is specified. The restore process is as follows: 1. The dump file will be restored within the current directory or that specified with -dir. 2. Within this directory, a subdir is created. It's name is the RW volume name that was dumped. An extension can be appended to this directory name with -extension. 3. All mountpoints will appear as symbolic links to the volume name. The path name to the volume will be either that in -mountpoint, or -dir. Symbolic links remain untouched. 4. You can change your umask during the restore with -umask. Otherwise, restorevol uses your current umask. Mode bits for directories are 0777 (then AND'ed with the umask). Mode bits for files are the owner mode bits duplicated accross group and user (then AND'ed with the umask). 5. For restores of full dumps, if a directory says it has a file and the file is not found, then a symbolic link AFSFile-<#> will appear in that restored tree. Restores of incremental dumps remove all these files at the end (expensive because it is a tree search). 6. If a file or directory was found in the dump but found not to be connected to the hierarchical tree, then the file or directory will be connected at the root of the tree as __ORPHANEDIR__.<#> or __ORPHANFILE__.<#>. 7. ACLs are not restored. CAUTIONS
Normally, use vos_restore(1) instead of this command. restorevol is a tool of last resort to try to extract data from the data structures stored in a volume dumpfile and is not as regularly tested or used as the normal vos_restore(1) implementation. Using restorevol bypasses checks done by the fileserver(8) and salvager(8). OPTIONS
-file <dump file> Specifies the volume dump file to be read and restored to the local filesystem. If this option is not given, the volume dump will be read from standard input. -dir <restore dir> Names the directory in which to create the restored filesystem. The current directory is used by default. Note that any mountpoints inside the volume will point to the same directory unless the -mountpoint option is also specified. -extension <name extension> By default, the name of the directory created matches the RW volume name of the volume in the dump file. If this option is used, the directory name will be the RW volume name name extension as the suffix. -mountpoint <mount point root> By default, mountpoints inside the volume being restored point to the value given by -dir. This option allows mountpoints to be resolved relative to another path. A common use for this would be to specify a path under /afs as the mount point root so that mountpoints inside the restored volume would be resolved via AFS. The mount point root must exist, and the process running the command have read access to that directory, or the command will fail. EXAMPLES
The following command restores the contents of the dumpfile in sample.dump to the directory /tmp/sample.2009-05-17, but having all mountpoints inside the volume point to AFS (note that this requires knowledge of where sample is mounted in AFS): % restorevol -file sample.dump -dir /tmp -extension .2009-05-17 -mountpoint /afs/example.org/sample Restoring volume dump of 'sample' to directory '/tmp/sample.2009-05-17' PRIVILEGE REQUIRED
The issuer must have read access to the dump file and write access to the directory into which the dump is restored. If the -mountpoint flag is given, the issuer must also have read access to that directory. SEE ALSO
salvager(8), voldump(8), vos_dump(1), vos_restore(1) COPYRIGHT
Copyright 2009 Steven Jenkins <steven@endpoint.com> This documentation is covered by the BSD License as written in the doc/LICENSE file. This man page was written by Steven Jenkins for OpenAFS. OpenAFS 2012-03-26 RESTOREVOL(1)
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy