Hi, I'm a newer for this languages, and I have a log file, which is something like this:
Now, I want to write a shell code to accoplish like ./XXX.sh -N n
n is a number by user input, the code should print the n most popular files, if -I, i should ignore all the .gif,.jpg, .jpeg, .png files(I know using AWK field '{print XX}' to accoplish this.) and -S, it ignores lines in the log whose status code is not 200. (200 in above line means successful access) and how let the program can allow batch operation, like -NIS XXX or -NI XX etc.
Here is my work so far:
Hey there,
Just have a quick question. i've written a program and it needs to
send a email to confirm it's completed. now i've done the
mail -s "Subject" test@test.com
the problem is the program, when run just waits. it doesn't execute the next command unless i press ^D. is there away... (6 Replies)
Hello There,
I am trying to write this SIMPLE script in Bourne Shell but I keep on getting a blank response. Can you see what I am doing wrong? I am simply trying to take the day of the week from our system and when the teachers sign on I want them to see the message of the day, when they exe... (2 Replies)
Hello all,
I am new to unix and having the below problem.Any help will be appreciated.
Write a Bourn shell script dTOe which takes as an input any number
between 0 and 999 and prints the English value for this number. The
program should display an error message when a NOT digit value entered.... (1 Reply)
Right now if I have a file that has the following information (with : as the delimiter)
name :address :phone number
I need to be able to do the following commands:
-n search for a name
-p search for a phone number
-l search for a last name starting with a particular
-c find an... (17 Replies)
This is a new exercise for me
1.) Create a bourne shell script that can accept 2 arguments/parameters. Name your script as housekeep_files.sh.
2.) The script will delete the files specified in the input file (1st parameter) and will send a notification through email (2nd parameter) the... (1 Reply)
how to use if-loop in bourne shell with multiple conditions like follows
if
then
commands
fi
it gives me an error
test: ] missing
then i put
if ]
it gives me an error
[[ not found
kindly i need the syntex for the bourne shell (5 Replies)
Hi, I have a very simple script like below:
for n in 10 20 30
do
for a in 30 40 50 60 70 80
do
for r in 2 3 4 5 6 7
do
m=$((r*a))
count=1
while
do
echo "a = " $a ", m = " $m ", n = " $n
... (2 Replies)
Hello
I am having issues with a script I'm working on developing on a Solaris machine.
The script is intended to find out how many times a particular user (by given userid) has logged into the local system for more than one hour today.
Here is my while loop:
last $user | grep -v 'sshd'... (7 Replies)
Hi there, Im sure there is a simple explanation for this but I have a file like this with no balnk lines
peter
paul
john
I run the command
# var=`grep paul file.txt`
# echo $var
paul
# echo $var | wc -l
1
but when I grep for a value that isnt in the file, i still... (4 Replies)
I've got an NTFS file system mounted on my Linux box, which means I can have multi-word directory names. I want to recurse through the directory structure copying stuff from /A to /B when it does not already exist on /B. Here is the chunk of code, and the output of a set -x run on that chunk of... (8 Replies)
Discussion started by: esmith92000
8 Replies
LEARN ABOUT CENTOS
xfs_estimate
xfs_estimate(8) System Manager's Manual xfs_estimate(8)NAME
xfs_estimate - estimate the space that an XFS filesystem will take
SYNOPSIS
xfs_estimate [ -h ] [ -b blocksize ] [ -i logsize ]
[ -e logsize ] [ -v ] directory ...
xfs_estimate -V
DESCRIPTION
For each directory argument, xfs_estimate estimates the space that directory would take if it were copied to an XFS filesystem. xfs_esti-
mate does not cross mount points. The following definitions are used:
KB = *1024
MB = *1024*1024
GB = *1024*1024*1024
The xfs_estimate options are:
-b blocksize
Use blocksize instead of the default blocksize of 4096 bytes. The modifier k can be used after the number to indicate multiplica-
tion by 1024. For example,
xfs_estimate -b 64k /
requests an estimate of the space required by the directory / on an XFS filesystem using a blocksize of 64K (65536) bytes.
-v Display more information, formatted.
-h Display usage message.
-i, -e logsize
Use logsize instead of the default log size of 1000 blocks. -i refers to an internal log, while -e refers to an external log. The
modifiers k or m can be used after the number to indicate multiplication by 1024 or 1048576, respectively.
For example,
xfs_estimate -i 1m /
requests an estimate of the space required by the directory / on an XFS filesystem using an internal log of 1 megabyte.
-V Print the version number and exits.
EXAMPLES
% xfs_estimate -e 10m /var/tmp
/var/tmp will take about 4.2 megabytes
with the external log using 2560 blocks or about 10.0 megabytes
% xfs_estimate -v -e 10m /var/tmp
directory bsize blocks megabytes logsize
/var/tmp 4096 792 4.0MB 10485760
% xfs_estimate -v /var/tmp
directory bsize blocks megabytes logsize
/var/tmp 4096 3352 14.0MB 10485760
% xfs_estimate /var/tmp
/var/tmp will take about 14.0 megabytes
xfs_estimate(8)