Is there a command that will return the name of the largest file within a directory? If so, can I set the returned filename into a variable? (4 Replies)
hi
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out1
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out2
diff out1 out2
i tried this it will work fine and i can see difference
but i need a script which should neglect, if the difference b/w files is small
and
it should display... (5 Replies)
I need to get a file size and compare it to a previous day file size. If it's larger or smaller by 50 percent I'll replace the new with the old. I know how to get the file sizes but do not know how to calculate if it's 50 percent difference.
Thanks for your help. (2 Replies)
Hi everyone!
I need to compare two file sizes.
One of them (size) will be stored in a flat file and the other coming from a listed file.
I can now get the first file size using:
SIZE=`ls -l $DOCTYPE | awk '{print $5}'`
1. How can I store this value in a flat file?
2. How... (2 Replies)
I need to write a bash script larger X Y that compares the sizes of two specified files X and Y,
and reports which file is larger. For example, if X is larger, the output should be "File X is larger",
while if Y is larger, the output should be "File Y is larger".
If the files are exactly the... (3 Replies)
Hello folks
I have a txt file of information about journal articles from different fields. I need to convert this information into a format that is easier for computers to manipulate for some research that I'm doing on how articles are cited. The file has some header information and then details... (8 Replies)
Hi dears
i have text file like this:
INPUT.txt
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
.
.
. and have another text
like this
TABLE.txt
j j
nuh word1... (6 Replies)
Hello,
I currently have very little experience with Shell scripting and trying to create a script for the purpose of collecting the size of a couple sizes on 4 different Hosts. The Idea is to collected the information from the files in which the script is kicked off on, store the values into... (17 Replies)
Discussion started by: Abstract3000
17 Replies
LEARN ABOUT PHP
fs_setcachesize
FS_SETCACHESIZE(1) AFS Command Reference FS_SETCACHESIZE(1)NAME
fs_setcachesize - Sets the size of the disk cache
SYNOPSIS
fs setcachesize [-blocks <size (0 = reset)>>] [-reset] [-help]
fs setca [-b <size (0 = reset)>>] [-r] [-h]
fs cachesize [-b <size (0 = reset)>>] [-r] [-h]
fs ca [-b <size (0 = reset)>>] [-r] [-h]
DESCRIPTION
The fs setcachesize command changes the number of kilobyte blocks of local disk space available to the Cache Manager for its data cache, on
machines that use a disk cache. The command is not operative on machines that use a memory cache.
To return the cache size to the default value specified in the third field of the local /etc/openafs/cacheinfo file, provide a value of 0
to the -blocks argument.
To return the cache size to the value set when the machine was last rebooted, use the -reset flag instead of the -blocks argument. This is
normally the amount specified in the cacheinfo file, unless the -blocks argument was included on the afsd command to override the cacheinfo
value.
To display the current cache size and amount of cache in use, for both disk and memory caches, use the fs getcacheparms command.
CAUTIONS
This command is not operative on machines using a memory cache, and results in an error message. To change memory cache size, edit the
cacheinfo file and reboot, or reboot and provide the -blocks argument to the afsd command.
On machines using a disk cache, do not set the cache size to exceed 85% to 90% of the actual disk space available for the cache directory.
The cache implementation itself requires a small amount of space on the partition.
OPTIONS -blocks <size>
Specifies the amount of disk space available for the Cache Manager to devote to the cache. The size should be a positive integer
followed by an optional suffix: "K" for kibibytes (1024 bytes, the default), "M" for mebibytes (1024 kibibytes), "G" for gibibytes
(1024 mebibytes), and "T" for tebibytes (1024 gibibytes). Provide a value of 0 to set cache size to the default specified in the
cacheinfo file.
-reset
Returns the cache size to the value set when the machine was last booted. This agrees with the value in the cacheinfo file unless the
-blocks argument was used on the afsd command.
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following command sets the disk cache size to 25000 kilobyte blocks.
% fs setcachesize -blocks 25000
Both of the following commands reset the disk cache size to the value in the cacheinfo file, assuming that the -blocks argument to the afsd
command was not used.
% fs setcachesize -blocks 0
% fs setcachesize -reset
PRIVILEGE REQUIRED
The issuer must be logged in as the local superuser root.
SEE ALSO cacheinfo(5), afsd(8), fs_getcacheparms(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 FS_SETCACHESIZE(1)