Hi ppl.
I have to check for duplicate files in a directory .
the directory has following files
/the/folder /containing/the/file
a1.yyyymmddhhmmss
a1.yyyyMMddhhmmss
b1.yyyymmddhhmmss
b2.yyyymmddhhmmss
c.yyyymmddhhmmss
d.yyyymmddhhmmss
d.yyyymmddhhmmss
where the date time stamp can be... (1 Reply)
Hi,
I am new to unix scripting and I need to write a script that accepts a directory name as an argument, and inside the script to go through all the ".dat" files in that directory. For each ".dat" file in the directory, create a control file(.ctl) file containing the associated ".dat" file name... (0 Replies)
Hello everyone,
I have been struggling to clean up a back-up mess I created when manually duplicating a directory structure and then working in both of them..
The structures now are significantly different and contain in the order of 15 k files of which most are duplicates.
Now I am trying to... (0 Replies)
Hi,
I have found a directory on my web server that have 2 same directory names in the same location on the same partition. Is there a way to mkdir a name twice and be able to see them both in the same location?
Heres an example of the ouput:
# ls
access_log.1.bkup ... (10 Replies)
Hi all.
Am doing continuous backup of mailboxes using rsync.
So whenever a new mail arrives it is automatically copied on backup server.
When a new mail arrives it is named as xyz:2, when it is read by the email client an S is appended xyz:2,S
Eventually , 2 copies of the same file exist on... (7 Replies)
Script must removes files from the first directory if there is a file with same name in the second directory
Script passed to the two directories, it lies with them in one directory:
sh script_name dir1 dir2
This is my version, but it does not work :wall:
set - $2/*
for i
do
set -... (6 Replies)
Hi,
I'm running a RHEL6 machine on a VMWare platform and I have somehow created a duplicate /home directory. See below.
# pwd
/home/home/twood
# ls
Desktop Documents Downloads Music Pictures Public Templates Videos
#
I am currently working on some disk quota procedures and I... (2 Replies)
Hi ,
I had a requirement to compare two files whether the two files are same or different .... like(files contaisn of two columns each)
file1.txt
121343432213 1234
64564564646 2345
343423424234 2456
file2.txt
121343432213 1234
64564564646 2345
31231313123 3455
how to... (2 Replies)
Hi,
Could you please assist how to move the gz files which are older than the 90 days from one folder to another folder ,before that it need to check the file system named "nfs" if size is less than 90 or not. If size is above 90 then it shouldn't perform file move and exit the script throwing... (4 Replies)
I am currently trying to do a PHP script that detects automatically if Apache Splunk authentication is required or not but I'm having a hard time since HTTP code 303 is always coming back, even if auth is required or not.
Here is the script so far;
<?php
/**
* Apache Splunk script to... (4 Replies)
Discussion started by: syrius
4 Replies
LEARN ABOUT CENTOS
string::crc32
CRC32(3) User Contributed Perl Documentation CRC32(3)NAME
String::CRC32 - Perl interface for cyclic redundency check generation
SYNOPSIS
use String::CRC32;
$crc = crc32("some string");
$crc = crc32("some string", initvalue);
$somestring = "some string";
$crc = crc32($somestring);
open(SOMEFILE, "location/of/some.file");
$crc = crc32(*SOMEFILE);
close(SOMEFILE);
DESCRIPTION
The CRC32 module calculates CRC sums of 32 bit lenghts. It generates the same CRC values as ZMODEM, PKZIP, PICCHECK and many others.
Despite its name, this module is able to compute the checksum of files as well as strings.
EXAMPLES
$crc = crc32("some string");
results in the same as
$crc = crc32(" string", crc32("some"));
This is useful for subsequent CRC checking of substrings.
You may even check files:
open(SOMEFILE, "location/of/some.file");
$crc = crc32(*SOMEFILE);
close(SOMEFILE);
A init value may also been supplied in the above example.
AUTHOR
Soenke J. Peters <peters__perl@opcenter.de>
Please be so kind as to report any bugs/suggestions to the above address.
COPYRIGHT
CRC algorithm code taken from CRC-32 by Craig Bruce. The module stuff is inspired by a similar perl module called String::CRC by David
Sharnoff & Matthew Dillon. Horst Fickenscher told me that it could be useful to supply an init value to the crc checking function and so I
included this possibility.
The author of this package disclaims all copyrights and releases it into the public domain.
perl v5.16.3 2005-04-04 CRC32(3)