Sponsored Content
Top Forums UNIX for Dummies Questions & Answers After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted Post 302954053 by linuxmanju on Friday 4th of September 2015 01:37:24 AM
Old 09-04-2015
Quote:
Originally Posted by Khan28
Hi Folks,

While transferring file from FTP software like Filezilla the files gets corrupted.
Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary but when that particular is used in someother shell script I come to know that it is corrupted.

Regards,
Why can't you use md5sum ?.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

FTP'ed in ASCII a word file, how to recover

This is my worst nightmare in recent years!!! I spent two days writing a proposal due tomorrow, ftp'ed the Word doc to a Unix machine in ASCII mode (i forgot to turn BIN on). Then I was trying to help a colleague download it and I accidently download the ASCII file back to the same dir on my... (1 Reply)
Discussion started by: venkir
1 Replies

2. UNIX for Dummies Questions & Answers

how to check a file to contain only ascii charaters

HI I need to validate a file in UNIX to contain only ascii characters.This is a production issue.Can anyone help with the command? Thanks Subbarao (1 Reply)
Discussion started by: srichakra9
1 Replies

3. Shell Programming and Scripting

ftp - determine ascii or binary file

Hello, How to i determine via ftp commandline if files on ftp server is ascii or binary files. Like every other comon windows ftp program does it automatically. regards Thomas (5 Replies)
Discussion started by: congo
5 Replies

4. UNIX for Advanced & Expert Users

Dynamically ftp'ing a file

Hi, I am having unix script that passes argument value to script. The script finds the file and keeps it in a directory. I need to ftp this file to another server. Please guide me how to acieve this. I am able to connect to ftp server but i am not able to use the unix argument in the ftp... (0 Replies)
Discussion started by: pyaranoid
0 Replies

5. Shell Programming and Scripting

size of a file that iam ftp ing

Hi, I want to compare the size of the files in my local machine before ftp ing it and the size of the file in the remote machine i.e after ftping . SO that the ftp is successful . (3 Replies)
Discussion started by: dineshr85
3 Replies

6. Shell Programming and Scripting

how to check the file data type(ascii or binary)

hi i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format, please help thanks in advance satya (1 Reply)
Discussion started by: Satyak
1 Replies

7. Shell Programming and Scripting

How to check if the file has EBCDIC or ascii characters

Hi, is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

8. Solaris

UFS File System Periodically Corrupted - What to check?

The system is a SunFire V440 running SunOS 5.10 About once every 3-4 weeks, the system will reboot into single user mode on its own, and then I run svcs -xv, the filesystem service and dependent services will be disabled due to the metadisk file system being corrupted. The I've been doing... (2 Replies)
Discussion started by: the.gooch
2 Replies

9. Shell Programming and Scripting

FTP'ing the zipped file

Hi, I need to have a shell script that FTP's a zipped file from a particular location. I have some path and inside that path i will have folders like x_timestamp and inside x_timestamp there may many folders based upon events like y_111,y_222,y_333.Inside each event there will be another... (3 Replies)
Discussion started by: weknowd
3 Replies

10. UNIX for Beginners Questions & Answers

Check if file is EBCDIC or ASCII format

So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file: my file is: file1.txt-->this ebcdic file file2.txt-->ascii file i tried below code: file=file1.txt type="`file $file`" i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
ftpconversions(4)						   File Formats 						 ftpconversions(4)

NAME
ftpconversions - FTP Server conversions database SYNOPSIS
/etc/ftpd/ftpconversions DESCRIPTION
When the FTP Server, in.ftpd(1M), receives the retrieve (RETR) command, if the specified file does not exist, it looks for a conversion to change an existing file or directory of the same base name into the format requested, subject to the ftpaccess(4) compress and tar capabil- ities. The conversions and their attributes known by in.ftpd(1M) are stored in an ASCII file of the following format. Each line in the file pro- vides a description for a single conversion. The fields in this file are separated by colons (:). %s:%s:%s:%s:%s:%s:%s:%s 1 2 3 4 5 6 7 8 The fields are described as follows: 1 Strip prefix. 2 Strip postfix. 3 Addon prefix. 4 Addon postfix. 5 External command. 6 Types. 7 Options. 8 Description. The Strip prefix and Addon prefix fields are not currently supported. The Strip postfix and addon postfix fields are extensions to be added to or removed from the requested filename in attempting to produce the name of an existing file or directory. When the attempt succeeds, the FTP Server runs the external command associated with the conver- sion. The magic cookie %s in the argument is passed to the command, replaced with the name of the existing file or directory. External command is the absolute pathname of a command to run followed by the appropriate options to carry out the conversion. The standard output of the command is sent back in response to the RETR (retrieve) command. For anonymous and guest users to be able to execute the com- mand, it must be present in their chroot'd hierarchy along with any necessary dynamic libraries. Types specifies the conversion type. The following values are recognized: T_ASCII ASCII transfers are allowed of a file produced by the conversion. T_DIR Directories can be converted. T_REG Regular files can be converted. Options are checked against the ftpaccess(4) compress and tar capabilities and are recorded in the special-action-flag field that is writ- ten to the FTP Server logfile. See xferlog(4). The following options are supported: O_COMPRESS conversion compresses O_TAR conversion archives O_UNCOMPRESS conversion uncompresses You can specify more than one option by using "|" to separate options. For example, O_TAR|O_COMPRESS specifies that the conversion archives and compresses. Description is a one word description of the conversion that is used in error messages returned to the FTP client. Lines that begin with a # sign are treated as comment lines and are ignored. EXAMPLES
Example 1: Compressing a Regular File for Transfer The following example specifies a conversion which generates filename.Z by compressing an existing file filename. The conversion can only be applied to regular files, not directories, and the absence of T_ASCII prevents the resulting file from being transferred in ASCII mode. : : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS Example 2: Uncompressing and Transferring in ASCII Mode The following example specifies a conversion that takes filename.Z and uncompresses it to produce filename, which then can be transferred in ASCII mode. :.Z: : :/usr/bin/compress -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS FILES
/etc/ftpd/ftpconversions ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWftpr | +-----------------------------+-----------------------------+ SEE ALSO
ldd(1), in.ftpd(1M), ftpaccess(4), xferlog(4), attributes(5) SunOS 5.10 1 May 2003 ftpconversions(4)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy