I'm looking for a command which removes files having 0 byte of having only header line (1 line).
My ETL process generates these files. Few files are not having header, in that case if no data from source, it will be 0 byte and few files are having header, in that case if no data from source, it will generate a byte with header information only, but no data.
I found the command to remove file with 0 byte
But not able to find command to remove file having only one line (header). I tried below command, but it is not working
I need it in form of command, as I do not want to create shell script to run at the end of ETL process
I would like to remove some lines from begining of file (header) and some lines from end of file (footer).
The header/footer lines generated by web-browser when the user upload a file to my webserver.
Example:
-----------------------------7d62af20c052c
Content-Disposition: form-data;... (2 Replies)
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
I need to concatenate about a thousand files (using a loop) on a UNIX server. Also, each file has a header row which is to be removed. Which of the following would give better performance?
tail+2 <filename> or sed '1,1d' <filename>
Or is there another, faster way?
Thanks,
Kaus (4 Replies)
I have some HP4+ and HP5 printers printing from Unixware 7.1.4. The problem is that they print a page header with the date and page number. I can't seem to figure out how to stop this. These headers through the pagination off. (2 Replies)
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Hi All
Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE.
Please suggest me something.
Thank's and regards
Vinay (1 Reply)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
I want to delete the header and footer in the file by using sed for that i ran the below script and my text file looks like
emp.txt
# This file contain employee
# information
abc 12300 34 'FGH'
# This is confidential as per the firm rules.
my intention is to remove the header... (8 Replies)
it still display header and footer
header
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 13:41:51 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real... (0 Replies)
Hi,
I have a requirement to move zero byte files to an archive folder. I have the below script and it works fine if I run it from where the file is present. But when I run the script from different folder, I am getting error that file is not present. Please help.
#!/bin/ksh
... (11 Replies)
Discussion started by: Prasannag87
11 Replies
LEARN ABOUT REDHAT
afile
AFILE(1) General Commands Manual AFILE(1)NAME
afile - display type and creator of Apple Macintosh files (netatalk format)
SYNOPSIS
afile [ -a ] file ...
DESCRIPTION
afile displays the name and Macintosh type and creator of the file arguments. Tests whether the file is an AppleDouble header, in which
case it checks the corresponding data fork exists, or assumes it is a data fork in which case it looks for the corresponding AppleDouble to
find the type/creator information.
afile does not look at any of the extension mapping files such as AppleVolumes.system.
OPTIONS -a Include directories and data files of unknown type (i.e. without corresponding AppleDouble) in output.
DIAGNOSTICS
returns exit status 0 if all files have a corresponding valid .AppleDouble header or data fork, or 99 for bad command line options. Other-
wise it returns the following error code relating to the last invalid file.
1 file doesn't exist
2 file is unreadable
3 file is directory
4 file is AppleDouble without data fork
5 file is AppleDouble with unreadable data fork
6 file is data fork without AppleDouble
7 file is data fork with unreadable AppleDouble
8 file is data fork with short AppleDouble
9 bad magic in AppleDouble
SEE ALSO achfile(1), afpd(1)
26 Feb 1998 AFILE(1)