I want to add both timestamp and file list to the log. Currently, I can only get one.
I have converted my DB file to byte array and want to pass it my web service in order to save on server.
From the man page of logrotate:
minsize size
Log files are rotated when they grow bigger than size bytes, but not before the additionally specified time interval (daily, weekly,
monthly, or yearly).
While backing up some data (a 200 GB home directory) with rsync, I got an I/0 error for a particular file, after which rsync continued on "normally" with its backup. The problem source file showed as having a file size of 72 bytes.
I cancelled rsync, and ran the same command again. This time that same file showed to be transferring data.. lots of data ...and more data, and more...
Hi,
I have the code below as
Code:
cat <filename> | tr '~' '\n' | sed '/^$/ d' | sed "s/*/|/g" > <filename>
awk -F\| -vt=`date +%m%d%y%H%M%S%s` '$1=="ST",$1=="SE"{if($1=="ST"){close(f);f="214_edifile_"t"" ++i} ; $1=$1; print>f}' OFS=\| <filename>
This script replaces some characters and extracts the records
Hi,
I writing a shell program to remove the data from output of the find which matches a list in a file
I am using the below find command to get the list of files
x=`find .
i create a file using dd command like this:
dd if=/dev/zero of=1g.dd bs=1M count=512 seek=512
when i run command ls 1g.dd, its size is 1G, run du 1g.dd, it's 512M.
there is a struct stat in c library to read file size, but it can only read out that 1G size, now how can i get that 512M size which is the real size of that file?
now the only way i know is to parse shell command du's output.
Given the size of a file in bytes, I want to format it in kibibytes, mebibytes etc. to 3 significant figures with trailing zeros, e.g. 1883954 becomes 1.80M. Floating-point arithmetic isn't supported in bash, so I used awk instead. The problem is I don't how to keep the trailing zeros.
Folks,
Enquiry for a friend, he has recorded two programs; one is over DOUBLE the file size but checking ffmpeg output not sure why so much bigger.
The bigger file is a little longer in duration but only 12 mins on a 84 minute movie, encoding diomensions are slightly bigger BUT video bit rate is actually LOWER.
Anyone cast an idea why the much bigger file size; output file attached..