Using the LINUX / UNIX version


This version is distributed as source only, meaning you have to compile it yourself. It should be easy to compile and running under any UNIX system there is, at least so far we didn’t find a single UNIX system where it didn’t work.

To compile it, you will need an ANSI-C compatible C compiler installed on your system. Almost all unix systems fulfill this condition. If there is no C compiler installed on your system, beg your administrator to install one for you. If you are your own administrator, don’t have a C compiler installed and don’t know how to install one, try installing Windows and use the other version of pdSFV :-) OK, just kidding… compile the source using

gcc –o pdsfv pdsfv.c

If you don’t have GNU C installed on your system, try using “cc” with the same command line parameters. It should compile without any errors or warnings and you should get a “pdsfv” binary in the current directory. It is a good idea to copy it into a directory which is in your PATH. If you have root access, copy it to /usr/bin or similar. If you are normal user only and have a subdir “bin” in your homedir, try putting the stuff there. If both of them fail you’ll have to type the full pathname to pdsfv everytime, so maybe you want to try the alias command for it :)

Running pdsfv without any command line parameters will display a short help page.


Creating SFV Files

Basically this is done using the –c command line option. For example:

pdsfv –c myrelease.sfv myrelease.r??

will create a new sfv file called myrelease.sfv and list all files of the RAR-archive “myrelease” there.

Use the –d option to add size & date stamps as comments to the SFV file and –l to add your group’s logo:

pdsfv –d -c myrls.sfv -l /home/lamer/mygroup.nfo myrls.r*

By default, pdSFV in its unix version will only add files which are part of a RAR archive or MP3 files to the SFV file. This is how it should be. If you really want to add all files that match the filemask you give on the command line, for example even NFO and JPG files, use the –a switch.

pdsfv -c myrelease.sfv -a myrls.*

for example would also add “myrls.nfo” to the SFV file and not only “myrls.rar, myrls.r00 etc.” . As described in the Windows GUI section, this generally is a pretty damn bad idea, so you will hardly use it.

WIN-SFV compatibility mode is activated by using the –w switch. As stated in the Windows section, this is considered unnecessary nowadays and you only should use it if you have a special reason for it.



Testing individual files

One or more files can be tested by using the –t operating mode, which needs the name of the SFV file to use passed and accepts a list of files you want to have tested.

pdsfv -t myrls.sfv myrls.rar myrls.r00

for example will test two files, myrls.rar and myrls.r00 . For shellscripts: errorlevel is 0 if all files were OK, 1 if there was at least one bad file. If you want to use pdSFV with your FTP site, check out the developer section of this documentation. Of course you can use wildcards as filenames, like myrls.r* ... you should consider using the following option though:

Testing whole releases

Checking all files listed in a SFV file can be done by using the –T operating mode. For example

pdsfv –T myrls.sfv

will test all files listed in myrls.sfv and tell you which files are good, bad or missing. Bad means the file on your harddisk has a different checksum than listed in the SFV file. Missing means there is a file listed in the SFV which was not found on your hard disk. 

For shellscripts: errorlevel is 0 if all files are good, 1 if there is at least one file bad, 2 if there is at least one file missing.

 

Counting files

You can use pdsfv to count how many files are listed in a SFV file, how many of them you do have on your hard disk yet, and how many aren’t there yet. The output may look a bit weird if you run it interactively but this operating mode is mainly intended for shellscripts. For example:

---
pdsfv -m myrls.sfv

Performing completion check...
[total files listed] [local files] [missing files]
4
3
1
---

To get the number of files existing locally (3 in our example), you could use some script like:

NUMLOCAL=`pdsfv -m myrls.sfv | tail -n 2 | head -n 1`
echo "$NUMLOCAL files of this release have arrived yet!"