10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
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... (7 Replies)
Discussion started by: ace_friends22
7 Replies
2. Shell Programming and Scripting
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
3. UNIX for Advanced & Expert Users
Hi
Im migrating a few websites from my old webserver (CentOS-5) to a new server (CentOS6) , one of these websites is multilingual and has a lot of utf8 files(html,php) with different languages (i.e arabic, persian, russian ,etc).
In old server when i do:
file mailer.php
I get :
... (6 Replies)
Discussion started by: mohs3n
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
In a list of commands executed in a script, how do you make sure that the previous command worked fine?
I have a list of awk commands and I want to make sure that the script aborts if any command leaves a zero byte file. (1 Reply)
Discussion started by: genehunter
1 Replies
5. Emergency UNIX and Linux Support
I were checking few processes running and check what at the files currently I have in my home directory by giving below commands
$ ps -ef|grep sleep
$ ls -lt | pg
after awhile the first column of my commands were created as files given below...
-rw-rw-rw- 1 prd 0 Mar 25 09:42 ls... (7 Replies)
Discussion started by: dateez
7 Replies
6. Shell Programming and Scripting
hello all,
kindly i need your help, i made a script to print a specific lines from a huge file about 3 million line. the output of the script will be about 700,000 line...the problem is the script is too slow...it kept working for 5 days and the output was only 200,000 lines !!!
the script is... (16 Replies)
Discussion started by: m_wassal
16 Replies
7. Shell Programming and Scripting
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)
Discussion started by: vinayrao
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all;
I'm having a problem when want to list a large number of files in current directory using find together with the prune option.
First i used this command but it list all the files including those in sub directories:
find . -name "*.dat" | xargs ls -ltr
Then i modified the command... (2 Replies)
Discussion started by: ashikin_8119
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: krishmaths
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Is there any way to get count number of lines in all files which have more than o bytes in current directory
for example :
in /user/sri/ there are 3 files
abc 0 bytes
def 5 bytes
ghi 10 bytes
i need to get wc -l for all files which have > 0 bytes at a time ..is... (6 Replies)
Discussion started by: sri2005
6 Replies