I'm looking to create a Korn Shell script that, if given a directory as an arg, will calc bytes used by all files in the given directory and display that info. If no command line arg is given the program is to calc and display the bytes used by all the files in the pwd.
Example output:
... (3 Replies)
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)
Hello, everyone.
Could someone, please, tell me how to get the number of bytes in the terminal input queue without blocking and without consuming these bytes? I guess it could be called the peek functionality.
I've looked at termio tcgetattr() and tcsetattr() functions but could not find... (4 Replies)
Hi All,
OS:AIX 64 bits.
Requirement is to convert file_size from bytes to megabytes through shell script as below:
export DBALIST="xyz@rediffmail.com"
ls -ltr abcd.txt > file_size.result
export file_size=`awk -F" " '{ print $5 }' file_size.result`
if ]
then
mailx -s "File abcd.txt... (3 Replies)
Hi,
i have following line in my code.
eport.pl < $4 | dos2ux | head -2000 | paste -sd\| - | awk -v S="$1" '
Issue is, i get a message saying "awk:input line | found /file/path cannot be longer than 3000 bytes."
"source line number is 3"
Can someone help me with this please? (4 Replies)
While running script I am getting an error like
Few lines in data are not being processed.
After googling it I came to know that adding such line would give some memory to it
ini_set("memory_limit","64M");
my input file size is 1 GB.
Is that memory limit is based on RAM we have on... (1 Reply)
Hi,
on unix box, under /local/home/userid/logs folder, apps generated the following files
sw_warn.log
sw_error.log
eaijava.log
if there any application specific errors, the above file will keep growing.
if the file exceed 5000000 bytes, I would like to have a shell script which do... (6 Replies)
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)
Guys,
I want to get the high CPU utilization from top.
I am using below code :
top -d2 >> /home/dba_monitoring/host_top_output.txt
echo "Script started `date`" > $runlog
usage=`grep "^ *$1" /home/dba_monitoring/host_top_output.txt | awk '{print $12}' | sed 's/%//'`
And getting below... (7 Replies)
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
LEARN ABOUT FREEBSD
mkuzip
MKUZIP(8) BSD System Manager's Manual MKUZIP(8)NAME
mkuzip -- compress disk image for use with geom_uzip(4) class
SYNOPSIS
mkuzip [-v] [-o outfile] [-s cluster_size] infile
DESCRIPTION
The mkuzip utility compresses a disk image file so that the geom_uzip(4) class will be able to decompress the resulting image at run-time.
This allows for a significant reduction of size of disk image at the expense of some CPU time required to decompress the data each time it is
read. The mkuzip utility works in two phases:
1. An infile image is split into clusters; each cluster is compressed using zlib(3).
2. The resulting set of compressed clusters along with headers that allow locating each individual cluster is written to the output file.
The options are:
-o outfile
Name of the output file outfile. The default is to use the input name with the suffix .uzip.
-s cluster_size
Split the image into clusters of cluster_size bytes, 16384 bytes by default. The cluster_size should be a multiple of 512 bytes.
-v Display verbose messages.
NOTES
The compression ratio largely depends on the cluster size used. For large cluster sizes (16K and higher), typical compression ratios are
only 1-2% less than those achieved with gzip(1). However, it should be kept in mind that larger cluster sizes lead to higher overhead in the
geom_uzip(4) class, as the class has to decompress the whole cluster even if only a few bytes from that cluster have to be read.
The mkuzip utility inserts a short shell script at the beginning of the generated image, which makes it possible to ``run'' the image just
like any other shell script. The script tries to load the geom_uzip(4) class if it is not loaded, configure the image as an md(4) disk
device using mdconfig(8), and automatically mount it using mount_cd9660(8) on the mount point provided as the first argument to the script.
EXIT STATUS
The mkuzip utility exits 0 on success, and >0 if an error occurs.
SEE ALSO gzip(1), zlib(3), geom(4), geom_uzip(4), md(4), mdconfig(8), mount_cd9660(8)AUTHORS
Maxim Sobolev <sobomax@FreeBSD.org>
BSD March 17, 2006 BSD