Sponsored Content
Full Discussion: space hog
Top Forums UNIX for Dummies Questions & Answers space hog Post 61059 by afflack on Thursday 27th of January 2005 04:04:22 PM
Old 01-27-2005
Can u explain:

find $hog -mtime -1 -exec ls -l {} \;

I transfered a large file just before executing script so it could be considered a growing hog within 1 day as a test (Al.v1.4.3.410.Retail.rar)
Here is my output:

$ du -ks *|sort -nr|pg
217208 bac.tar
130664 16.1.0.30.tar
86583 ciagent_sms
3280 Al.v1.4.3.410.Retail.rar
3 test
2 house
1 test2.txt.gz
1 test2.txt
1 test1.txt
1 test.sh
1 test.csv
1 script.sh
1 private
1 one
1 hog1
1 hog.sh
1 files.tar.Z
1 dir_link
1 dead.letter
1 date.txt
1 csv_link
0 perm
$
$

HERE IT YOUR SCRIPT:

$ hog.sh
Current Hog - bac.tar (217208):
Current Hog - 16.1.0.30.tar (130664):
Current Hog - ciagent_sms (86583):
Current Hog - Al.v1.4.3.410.Retail.rar (3280):
-rw-r--r-- 1 joek staff 3344362 Jan 27 15:34 Alcohol.120%.v1.4.3.410.Retail.rar
Current Hog - test (3):
Current Hog - house (2):
Current Hog - test2.txt.gz (1):
Current Hog - test2.txt (1):
Current Hog - test1.txt (1):
Current Hog - test.sh (1):
Current Hog - test.csv (1):
Current Hog - script.sh (1):
Current Hog - private (1):
Current Hog - one (1):
Current Hog - hog1 (1):
-rw-r--r-- 1 joek staff 234 Jan 27 15:25 hog1
Current Hog - hog.sh (1):
-rwxrwxrwx 1 joek staff 224 Jan 27 15:48 hog.sh
Current Hog - files.tar.Z (1):
Current Hog - dir_link (1):
Current Hog - dead.letter (1):
-rw------- 1 joek staff 301 Jan 27 11:13 dead.letter
Current Hog - date.txt (1):
Current Hog - csv_link (1):
Current Hog - perm (0):

It looks like it works, but I would like to understand how? How does the last line work? (find $hog -mtime -1 -exec ls -l {} \Smilie

Also, when it searches for the hog for the past day could I format the output using - awk '{print $5,$NF,$6}' so it only displays column 5,6 and the last column of the "ls -l" command (size,filename, date).

I tried to insert that instead of the -exec comand with no luck.


-Thanks
 

8 More Discussions You Might Find Interesting

1. Solaris

Disk hog utility

Hi, I am looking for an utility on the lines of XDU - A Disk Usage (DU) or other tree display program or xdiskusage for finding disk hogs on a Solaris system. Any clues? Thanks, enc. (2 Replies)
Discussion started by: encrypted
2 Replies

2. UNIX for Advanced & Expert Users

wake up user space thread from kernel space ISR

Hello, I'm searching for a proper way to let the kernel space ISR(implemented in a kernel module) wake up a user space thread on a hardware interrupt. Except for sending a real-time signal, is it possible to use a semaphore? I've searched it on google, but it seems impossible to share a... (0 Replies)
Discussion started by: aaronwong
0 Replies

3. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

4. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

5. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

6. UNIX for Dummies Questions & Answers

Changing only the first space to a tab in a space delimited text file

Hi, I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies

7. UNIX for Advanced & Expert Users

Need to remove leading space from awk statement space from calculation

I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation? Here is my query: cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}' 02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies

8. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
PLSFONT(3plplot)						    PLplot API							  PLSFONT(3plplot)

NAME
plsfont - Set family, style and weight of the current font SYNOPSIS
plsfont(family, style, weight) DESCRIPTION
Sets the current font. See the PLplot documentation for more information on font selection. Redacted form: plsfont(family, style, weight) This function is used in example 23. ARGUMENTS
family (PLINT, input) Font family to select for the current font. The available values are given by the PL_FCI_* constants in plplot.h. Current options are PL_FCI_SANS, PL_FCI_SERIF, PL_FCI_MONO, PL_FCI_SCRIPT and PL_FCI_SYMBOL. A negative value signifies that the font family should not be altered. style (PLINT, input) Font style to select for the current font. The available values are given by the PL_FCI_* constants in plplot.h. Current options are PL_FCI_UPRIGHT, PL_FCI_ITALIC and PL_FCI_OBLIQUE. A negative value signifies that the font style should not be altered. weight (PLINT, input) Font weight to select for the current font. The available values are given by the PL_FCI_* constants in plplot.h. Current options are PL_FCI_MEDIUM and PL_FCI_BOLD. A negative value signifies that the font weight should not be altered. AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere. SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources. August, 2012 PLSFONT(3plplot)
All times are GMT -4. The time now is 06:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy