Hi,
I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes.
I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
hi all.
Please help me with archiving previous day syslog files.
the files have no extension and have the format YYYY-MM-DD.
I want to archive the file then move it to some other machine.
thanks. (2 Replies)
Hello folk,
I want to move some *.jpg and *.JPG to some folder but i want move from current path not from subdirectories, wants to move 200 days old file.
it will go in /dir/aa/target/*.jpg|*.JPG but not go inside /dir/aa/target/other-directories,
Plese help (2 Replies)
Hey, this might be a really basic question, but I'm new to Unix scripting.
I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure -
home/temp/test/dir1/ ... (3 Replies)
I have in directory /media/AUDIO/WAVE many .mp3 files with names like:
my filename_01of02.mp3
my filename_02of02.mp3
Your File_01of06.mp3
Your File_02of06.mp3
etc....
In the same directory, /media/AUDIO/WAVE, I have many folders with names like
9780743579490
9780743579491
etc..
Inside... (7 Replies)
Hi Team,
I have thousands of TIF files which are converted from PDF. Below is a sample of it.
LH9406_BLANCARAMOS_2012041812103210320001.tif
LH9406_BLANCARAMOS_2012041812103210320002.tif
LH9406_BLANCARAMOS_2012041812103210320003.tif
LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Hi All,
I have to requirement to write a shell script to move file from one folder (A) to another five folder (B,C,D,E,F) and destination folder should be blank. In not blank just skip.
This script will run as a scheduler every 2 minutes. It will check number of files in folder A and move 1 to... (9 Replies)
I want to move a folder with spaces from one folder to another.
I have two folders like this,
1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/
I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch... (2 Replies)
We are receiving few zipped files in one location say : apple/oranges/incoming
All .zip files are placed here in incoming folder.
So few of the files are password encrypted.
There are only 10 zipped files, so we are planning to create a script which will pick that zip file from incoming... (1 Reply)
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
LEARN ABOUT MOJAVE
iotop
iotop(1m) USER COMMANDS iotop(1m)NAME
iotop - display top disk I/O events by process. Uses DTrace.
SYNOPSIS
iotop [-C] [-D|-o|-P] [-j|-Z] [-d device] [-f filename] [-m mount_point] [-t top] [interval [count]]
DESCRIPTION
iotop tracks disk I/O by process, and prints a summary report that is refreshed every interval.
This is measuring disk events that have made it past system caches.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS -C don't clear the screen
-D print delta times - elapsed, us
-j print project ID
-o print disk delta times, us
-P print %I/O (disk delta times)
-Z print zone ID
-d device
instance name to snoop (eg, dad0)
-f filename
full pathname of file to snoop
-m mount_point
mountpoint for filesystem to snoop
-t top print top number only
EXAMPLES
Default output, print summary every 5 seconds
# iotop
One second samples,
# iotop 1
print %I/O (time based),
# iotop -P
Snoop events on the root filesystem only,
# iotop -m /
Print top 20 lines only,
# iotop -t 20
Print 12 x 5 second samples, scrolling,
# iotop -C 5 12
FIELDS
UID user ID
PID process ID
PPID parent process ID
PROJ project ID
ZONE zone ID
CMD command name for the process
DEVICE device name
MAJ device major number
MIN device minor number
D direction, Read or Write
BYTES total size of operations, bytes
ELAPSED
total elapsed times from request to completion, us (this is the elapsed time from the disk request (strategy) to the disk completion
(iodone))
DISKTIME
total times for disk to complete request, us (this is the time for the disk to complete that event since it's last event (time
between iodones), or, the time to the strategy if the disk had been idle)
%I/O percent disk I/O, based on time (DISKTIME)
load 1 minute load average
disk_r total disk read Kb for sample
disk_w total disk write Kb for sample
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
iotop will run forever until Ctrl-C is hit, or the specified interval is reached.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO iosnoop(1M), dtrace(1M)version 0.75 Oct 25, 2005 iotop(1m)