Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Trying to empty file using > but the file size increasing when next append Post 302208065 by firdousamir on Monday 23rd of June 2008 01:08:35 AM
Old 06-23-2008
Trying to empty file using > but the file size increasing when next append

AIX 5.3 / KSH

I have a Java application which creates a log file a.log. I have a KSH script which does the following action

Code:
cp a.log /directory2/b.log
> a.log

After this the file size goes to 0 as per "ls -l"

Then next time when the application writes into this file, the file size is goes to the previous before the ">" operation happened.

I tried the Code in a different style:
Code:
cp a.log /directory2/b.log
cp /dev/null a.log

No change. What is the best way to do this?

***NOTE: I cannot use rm -f/touch method for cleaning up the log file because it requires a restart of the application.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

increasing ufs file system size in solaris

How do i increase the filesystem size on a root partition? There is a slice with root on it, its like 2 gigs and nothing else is broken out except home. I want to increase root filesystem (and slice) and break out /usr and /var. This is solaris 9, only has solaris volume manager on it. ... (6 Replies)
Discussion started by: BG_JrAdmin
6 Replies

2. AIX

Increasing File Size on AIX

Hi I am a bit green to AIX - but when our backup operator tries to do a restore from one AIX box to another, he get's the error: 'A file cannot be larger than the value set by ulimit' I am wondering what is the impact of increasing the AIX filesize limit of 2 gb to unlimited. And how would... (1 Reply)
Discussion started by: Rosie C
1 Replies

3. HP-UX

Help on increasing fs size

Hi Experts, I am not sure whether my question should be in this thread or some other one. I am using HP Tru64 system. Currently one of my filesystem /others is almost full. I need to know the exact commands to increase this filesystem. Please show me how to check for free partitions and add... (5 Replies)
Discussion started by: kingsto88
5 Replies

4. Solaris

increasing file system size

Hi Can anyone explain me how to increase the filesystem size. We can do it when the system is running? It needs an reboot? (8 Replies)
Discussion started by: rogerben
8 Replies

5. Shell Programming and Scripting

Unix file empty.. but size is greater than zero??/

Hi, I have a file by redirecting some contents in unix shell. Even when there is no content that is being redirected, the file size still shows greater than zero. but even if there is no matching pattern the file APPRES has size greater than 0bytes. awk -f AA.awk $logfile>APPRES... (3 Replies)
Discussion started by: justchill
3 Replies

6. Linux

Increasing total data size per file system request for block drivers

Hi All, I am writing a block driver for a 2GB SD card where i get the total amount of data per request as follows: struct request *req; uint card_addr,total_bytes; struct request_queue *rq = BlkDev->queue; req = elv_next_request(rq); .. .. card_addr = req->sector*512;... (1 Reply)
Discussion started by: amio
1 Replies

7. Shell Programming and Scripting

if file is NOT empty, then append content to file

hi people, i have texts down.txt and down-new.txt and i want to check; - if down-new.txt is NOT empty, then write date and its content to /home/gc_sw/down.txt for example; down.txt:AAAA SSSS down-new.txt:123 456 and after checking down-new.txt is NOT empty, down.txt should... (10 Replies)
Discussion started by: gc_sw
10 Replies

8. Shell Programming and Scripting

Symbolic link to an empty file shows size 2

Hi, I have created an empty file and a symbolic link to a file. But when I issue the following commands, I am getting the output 2. stat -c "%s" linkfile du -hb linkfile Why this is happening? (4 Replies)
Discussion started by: royalibrahim
4 Replies

9. Solaris

Help with increasing file system size in Sun OS 5.9

Hi, I have recently taken up to support these SunOS 5.9 sun4u sparc SUNW,Sun-Fire-V240 boxes and got a request to increase the size of /backup01 as its getting filled up quickly and can't play much on it as these are production servers. As I have no idea about how to do this, can anyone let me... (0 Replies)
Discussion started by: phanidhar6039
0 Replies

10. Emergency UNIX and Linux Support

Script to fill the file system mount with empty files to desired size

We are regularly using for our testing, where we are manually filling up the mount with desired size with following command dd if=/dev/zero of=file_2GB bs=2048000 count=2000 We are planning to automate the task where taking input for % of size as one input and the name of the file system... (8 Replies)
Discussion started by: chandu123
8 Replies
TRAYER(1)						      General Commands Manual							 TRAYER(1)

NAME
trayer - a lightweight GTK2-based systray for UNIX desktop SYNOPSIS
trayer -h trayer -v trayer [--edge left|right|top|bottom|none] [--align left|right|center] [--margin <size>] [--widthtype request|pixel|percent ] [--width <size>] [--heighttype <pixel>] [--height <size>] [--SetDockType true|false] [--SetPartialStrut true|false] [--transparent true|false] [--alpha <value>] [--tint <color>] [--distance <length>] [--distancefrom left|right|top|bottom|none] [--expand true|false] [--padding <size>] DESCRIPTION
trayer is a small program designed to provide system tray similar to these in GNOME / KDE desktop environments for window managers which does not support that function. It is similar to other applications such as peksystray and docker. System tray is a place, where many applications put their icons, so they are always visible. Such icons may present status of an applica- tion and allow user to control the program. trayer's code was extracted from fbpanel application, you can find more about it on its homepage: http://fbpanel.sourceforge.net/. OPTIONS
This programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --help -h Show summary of options and exit. --version -v Show version of program and exit. --edge left|right|top|bottom|none Specifies a screen edge to use. --align left|center|right Specifies an align of the icons. --margin <size> Specifies length of margin (in pixels) --widthtype request|pixel|percent Specifies method of calculating trayer's window width: request Follow application icons' size, so trayer may shrink or expand dynamically. pixel Set a fixed size, given with --width option in pixels. percent Set a fixed size, given with --width option in percentage of a length of screen edge. --width <size> Width of trayer's window. Ignored when --widthtype is set to request. --heighttype request|pixel|percent Specifies method of calculating trayer's window height: request Follow application icons' size, so trayer may shrink or expand dynamically. pixel Set a fixed size, given with --height option in pixels. percent Set a fixed size, given with --height option in percentage of a length of screen edge. --height <size> Height of trayer's window. Ignored when --heighttype is set to request. --SetDockType true|false Identify panel window type as dock. --SetPartialStrut true|false Reserve panel space so that it will not be covered by maximized windows. --transparent true|false Use transparency. --alpha <value> Percentage of transparency (0 - nontransparent, 255 - fully transparent) --tint <color> Color used to tint transparent background. Color is given as a 24-bit C hexadecimal integer, for example: 0xff0000 is red, 0xff8800 is orange and 0x00ff00 is green. --distance <length> Specifies distance between trayer's window and screen edge (in pixels) --distancefrom <edge> Specifies which edge to calculate distance from, see above. --expand true|false Specifies whether trayer may accommodate extra space when there is too much icons. --padding <size> Extra space between icons and trayer window's border. --monitor NUM|STRING Define the monitor on which you like trayer to appear, number of zero to number of monitors minus one, or the string "primary" are valid. The default value is 0. SEE ALSO
fbpanel(1) AUTHORS
Anatoly Asviyan <aanatoly@users.sf.net> - fbpanel Rafal Bisingier <ravbc@man.poznan.pl> Maciej Delmanowski <harnir@users.berlios.de> Grzegorz Nieweglowski <hoppke@dobremiasto.net> Thomas Rydzynski This manual page was written by Tomasz Melcer <liori@interia.pl>. FVWM-Crystal Feb 14, 2005 TRAYER(1)
All times are GMT -4. The time now is 12:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy