10-18-2007
Remove zero bytes files in folder
Hi,
Please shed some light on how to quickly remove all the zero bytes in which there are some mixtures of more than zero bytes in it.
For eg:
> ls -lrt
-rw-r--r-- 1 ab noen 0 Jul 27 15:47 supplier_mp.unl
-rw-rw-r-- 1 ab noen 507 Aug 5 14:13 glance.err
-rw-r--r-- 1 ab noen 0 Aug 15 09:46 aaa.txt
-rw-r--r-- 1 ab noen 662 Aug 16 15:15 role999
-rw-r--r-- 1 ab noen 0 Aug 28 12:18 test
-rw-r--r-- 1 ab noen 566 Sep 11 08:48 cmd_srv_11092007
-rw-r--r-- 1 ab noen 0 Oct 3 16:15 run_new.log
-rw-r--r-- 1 ab noen 611 Oct 4 10:32 Query.in
-rw-r--r-- 1 ab noen 0 Oct 4 10:32 Response.log
-rw-r--r-- 1 ab noen 949 Oct 4 10:32 Request.log
-rw-r--r-- 1 ab noen 864 Oct 4 10:32 Summary.log
-rw-r--r-- 1 ab noen 424 Oct 9 01:57 skill.sh
Help..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Can anyone tell how to list all files in current directory which has more than 0 bytes? (4 Replies)
Discussion started by: sri2005
4 Replies
2. Shell Programming and Scripting
Hi all,
Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this?
Your help is greatly appreciated!!
Best Regards,
Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I want to find zero byte files in the given folder for the given day.
I know we can use find . -size 0 -mtime 0
But is there an option for file creation.?
ls -lart | grep ' 0 Apr 24' will also work.
Also is there any alternative using awk ?
I want to know how to use awk in... (1 Reply)
Discussion started by: preethgideon
1 Replies
4. Shell Programming and Scripting
Hi,
is it possible to remove all duplicate lines from all txt files in a specific folder?
This is too hard for me maybe someone could help.
lets say we have an amount of textfiles 1 or 2 or 3 or... maximum 50
each textfile has lines with text.
I want all lines of all textfiles... (8 Replies)
Discussion started by: lowmaster
8 Replies
5. Shell Programming and Scripting
I need a scriptto print only those files from a list of files starting with STMT* which are not of zero bytes ...i.e they have some size
if these are the files
631
-rw-r--r-- 1 assrisa assrisa 39099 Aug 19 07:16 STMT_05_D1090819_T071320
-rw-r--r-- 1 assrisa assrisa 0 Aug 19... (2 Replies)
Discussion started by: viv1
2 Replies
6. Shell Programming and Scripting
Hi All,
A site I manage had some javascript inserted into each folders index file. Can anyone priovide me with some ideas on how to use awk, sed or some other bash script to parse through each of the site folders and remove this code? If I have to do it by hand I'm going to go insane. :eek:
... (2 Replies)
Discussion started by: lsalsich
2 Replies
7. Programming
Hi,
If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script.
dd bs=1024 count=3 if=/src of=/dest
But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Discussion started by: royalibrahim
3 Replies
8. UNIX for Dummies Questions & Answers
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies
9. Shell Programming and Scripting
hello,
suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly.
example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly.
enter your name:
donald duck (this is of 11 bytes)
expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies
10. Shell Programming and Scripting
Hi All,
I do have an EBCDIC file sent from the z/os , this file has records with different record types in it, the type of record is identified by bytes 45-46 like
value 12 has employee record
value 14 has salaray record and etc....
we do now want to split the big ebcdic file into multiple... (3 Replies)
Discussion started by: okkadu
3 Replies
LEARN ABOUT DEBIAN
vmware-xferlogs
VMWARE-XFERLOGS(1) Open VM Tools VMWARE-XFERLOGS(1)
NAME
vmware-xferlogs - dump vm-support output to vmx logfile
SYNOPSIS
vmware-xferlogs OPTIONS FILE
DESCRIPTION
vmware-xferlogs is a simple console application and can be run as any user. It is based on rpctool to dump the vm-support output to the vmx
log file base64 encoded. It can dump any file supplied on the commandline to the vmx log. It also does the decoding part of it. It can read
the vmware.log file decode and write the encoded files in the directory it was invoked.
Example of a transfer found in the vmx log file:
Aug 24 18:48:09: vcpu-0| Guest: >Logfile Begins : /root/install.log: ver - 1 Aug 24 18:48:09: vcpu-0| Guest: >SW5zdGFs-
bGluZyA0NDEgcGFja2FnZXMKCkluc3RhbGxpbmcgZ2xpYmMtY29tbW9uLTIuMi41LTM0 Aug 24 18:48:09: vcpu-0| Guest: >LgpJbnN0YWx-
saW5nIGh3ZGF0YS0wLjE0LTEuCkluc3RhbGxpbmcgaW5kZXhodG1sLTcuMy0zLgpJ Aug 24 18:48:09: vcpu-0| Guest: >bnN0YWxsaW5nIG1haWxjYXAtMi4xLjk-
tMi4KSW5zdGFsbGluZyBtYW4tcGFnZXMtMS40OC0yLgpJ .... .... Aug 24 18:48:10: vcpu-0| Guest: >Mi4K Aug 24 18:48:10:
vcpu-0| Guest: >Logfile Ends
OPTIONS
enc
dec
SEE ALSO
vmware-checkvm(1)
vmware-hgfsclient(1)
vmware-toolbox(1)
vmware-toolbox-cmd(1)
vmware-user(1)
libguestlib(3)
libvmtools(3)
vmware-guestd(8)
vmware-hgfsmounter(8)
vmware-user-suid-wrapper(8)
vmblock(9)
vmci(9)
vmhgfs(9)
vmmemctl(9)
vmsock(9)
vmsync(9)
vmxnet(9)
vmxnet3(9)
HOMEPAGE
More information about vmware-xferlogs and the Open VM Tools can be found at <http://open-vm-tools.sourceforge.net/>.
AUTHOR
Open VM Tools were written by VMware, Inc. <http://www.vmware.com/>.
This manual page was put together from homepage materials by Daniel Baumann <daniel.baumann@progress-technologies.net>, for the Debian
project (but may be used by others).
2010.03.20-243334 2010-04-08 VMWARE-XFERLOGS(1)