Sponsored Content
Top Forums Shell Programming and Scripting Restart script based on MD5sum Post 302273031 by JerryHone on Friday 2nd of January 2009 10:24:22 AM
Old 01-02-2009
Have you used single quotes (') instead of backquotes (`) in the "chksum=" lines?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restart Script

Hi, I am writing a script and need to goto the start of the script if an incorrect command is wrongly entered what can i do. Andy (1 Reply)
Discussion started by: chapmana
1 Replies

2. Shell Programming and Scripting

Any Restart Script?

Hi, I would like to check if there's any sample of restart script for my AIX server. I'm planning to restart it every month. Thanks. (5 Replies)
Discussion started by: ademah
5 Replies

3. Shell Programming and Scripting

restart process based on file

Hi all. I do have a script "startApp.sh" (app result is a file /opt/extract/appextract.txt) I have no problems with stopping app var1=`ps -ef | grep -v grep | grep MyApp | awk '{print $2}'` kill -9 $var1 What I want to achieve is: I start app, app is doing some extraction, after... (11 Replies)
Discussion started by: e-l-diablo
11 Replies

4. Shell Programming and Scripting

How to restart a script?

Hello, I created a shell script in /etc/init.d and it already runs at boot. However I cannot figure out how to make it run just like typing "scrip_name start" I can run it like this ./script_name but since I am doing remote log in whenever I log off the script stops and I also don't want to run... (8 Replies)
Discussion started by: kizofilax
8 Replies

5. Shell Programming and Scripting

Script to check MD5SUM on file

Hi, I currently have a shell script that takes an RPM and scp's it to a set of remote servers and installs it. What I would like to be able to do is make the script get the md5sum of the RPM locally (so get the md5sum of the rpm from where im running the script) and then scp the rpm to the... (0 Replies)
Discussion started by: tb1986
0 Replies

6. Shell Programming and Scripting

Using md5sum to name file based on URL

I am trying to download a file and make the filename of the file be the md5sum of the URL. I know to use wgets to download the file but I do not know how to do the rest...any help would be appreciated. (2 Replies)
Discussion started by: The undertaker
2 Replies

7. Shell Programming and Scripting

Md5sum script

Hello, I need to download multiple files from an FTP server but occasionally they arrive in error so I need to perform an integrity check. I've been attempting to write a bash script that does the following: Downloads all files including those in sub directories Perform md5sum using... (4 Replies)
Discussion started by: shadyuk
4 Replies

8. Shell Programming and Scripting

Making a script to copy files not seen before (using md5sum)

Hello, I would like to make a script that searches through a SRC folder and copies only files it's never seen before to a DEST folder. SRC = /user/.phonesync/photos-backup DST = /usr/.phonesync/photos-new So basically, I'd start with a: md5sum /user/.phonesync/photos-backup/* >... (29 Replies)
Discussion started by: nbsparks
29 Replies

9. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

10. Shell Programming and Scripting

[md5sum] script

I am getting No such file or directory if my variable contains white spaces... Is there a way to fix this? This works x="1.md5" md5sum -c "$x" This, does not x="23\ 5\ 6\ 7\ 8\ 9\ 10.md5" md5sum -c "$x" md5sum: '23\ 5\ 6\ 7\ 8\ 9\ 10.md5': No such file or directory How do I fix... (1 Reply)
Discussion started by: soichiro
1 Replies
tar(5)								File Formats Manual							    tar(5)

Name
       tar, mdtar - tape archive file format

Description
       The tape archive command dumps several files, including special files, into one, in a medium suitable for transportation.

       A  tape or file is a series of blocks.  Each block is of size TBLOCK.  A file on the tape is represented by a header block, which describes
       the file, followed by zero or more blocks, which give the contents of the file.	At the end of the tape are two blocks filled  with  binary
       zeros, as an end-of-file indicator.

       The  blocks  are  grouped  for  physical I/O operations.  Each group of n blocks (where n is set by the option on the command line, and the
       default is 20 blocks) is written with a single system call; on 9-track tapes, the result of this write is a single tape record.	 The  last
       group  is  always  written at the full size, so blocks after the two zero blocks contain random data.  On reading, the specified or default
       group size is used for the first read, but if that read returns less than a full tape block, the reduced block size  is	used  for  further
       reads.

       The following is an example of a header block:
       #define TBLOCK  512
       #define NAMSIZ  100

       union hblock {
	       char dummy[TBLOCK];
	       struct header {
		       char name[NAMSIZ];
		       char mode[8];
		       char uid[8];
		       char gid[8];
		       char size[12];
		       char mtime[12];
		       char chksum[8];
		       char linkflag;
		       char linkname[NAMSIZ];
		       char rdev[6]
	       } dbuf;
       };

       The  name  field  is  a	null-terminated string.  The other fields are 0-filled octal numbers in ASCII.	Each field (of width w) contains w
       minus 2 digits, a space, and a null, except size and mtime , which do not contain the trailing null.  The name field specifies the name	of
       the  file,  as  specified  on  the command line.  Files dumped because they were in a directory that was named in the command line have the
       directory name as prefix and /filename as suffix.  The field specifies the file mode, with the top bit masked off.  The uid and gid  fields
       specify	the  user  and group numbers that own the file.  The size field specifies the size of the file in bytes.  Links and symbolic links
       are dumped with this field specified as zero.  The mtime field specifies the modification time of the file at the time it was dumped.   The
       chksum  field  is a decimal ASCII value, which represents the sum of all the bytes in the header block.	When calculating the checksum, the
       chksum field is treated as if it were all blanks.  The linkflag field is ASCII 0 if the file is normal or a special file and ASCII 1 if	it
       is  a  hard  link,  and	ASCII  2  if it is a symbolic link.  The name to which it is linked, if any, is in linkname, with a trailing null.
       Unused fields of the header are binary zeros and are included in the checksum.  The rdev field encodes the ASCII representation of a device
       special file's major and minor device numbers.

       The  first  time  a given i-node number is dumped, it is dumped as a regular file.  The second and subsequent times, it is dumped as a link
       instead.  Upon retrieval, if a link entry is retrieved, but not the file it was linked to, an error message is printed and the tape must be
       manually rescanned to retrieve the linked file.

       The encoding of the header is designed to be portable across machines.

Restrictions
       Names or link names longer than NAMSIZ produce error reports and cannot be dumped.

See Also
       tar(1)

																	    tar(5)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy