Sponsored Content
Full Discussion: Regarding du and ll output
Top Forums Shell Programming and Scripting Regarding du and ll output Post 302427597 by engineer on Monday 7th of June 2010 07:38:43 AM
Old 06-07-2010
Regarding du and ll output

Hi,

I have some doubts regarding the output of "du" command.
In man page I could see that with "-k" I can get the size in Kilo bytes.
When I do ll on a file the output is in bytes.
I have some requirement to find the size of a file and directories in MegaBytes (MB) for that I am doing a du -k on them and converting the output to MB by dividing it by 1024.
Am I doing right here? Should I use ll as I could see a big difference between both.
Please help me understand.

Code:
 
-k             Gives the block count in 1024-byte blocks.


Last edited by engineer; 06-07-2010 at 08:50 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

2. Shell Programming and Scripting

Expect - Interact output hangs when large output

Hello, I have a simple expect script I use to ssh to a workstation. I then pass control over to the user with interact. This script works fine on my HP and Mac, but on my Linux Desktop, I get a problem where the terminal hangs when ever I execute a command in the interact session that requires a... (0 Replies)
Discussion started by: natedog
0 Replies

3. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

4. Shell Programming and Scripting

Converting line output to column based output

Hi Guys, I am trying to convert a file which has a row based output to a column based output. My original file looks like this: 1 2 3 4 5 6 1 2 3 1 2 3 (8 Replies)
Discussion started by: npatwardhan
8 Replies

5. Shell Programming and Scripting

awk: round output or delimit output of arithmatic string

I have a file with the following content. > cat /tmp/internetusage.txt 6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file. awk '{ print $1/$2*100 }' /tmp/internetusage.txt This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies

6. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

7. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

8. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

9. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

10. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
mkfs.gfs2(8)						      System Manager's Manual						      mkfs.gfs2(8)

NAME
mkfs.gfs2 - Make a GFS2 filesystem SYNOPSIS
mkfs.gfs2 [OPTION]... DEVICE [ block-count ] DESCRIPTION
mkfs.gfs2 is used to create a Global File System. OPTIONS
-b BlockSize Set the filesystem block size to BlockSize (must be a power of two). The minimum block size is 512. The FS block size cannot exceed the machine's memory page size. On the most architectures (i386, x86_64, s390, s390x), the memory page size is 4096 bytes. On other architectures it may be bigger. The default block size is 4096 bytes. In general, GFS2 filesystems should not deviate from the default value. -c MegaBytes Initial size of each journal's quota change file -D Enable debugging output. -h Print out a help message describing available options, then exit. -J MegaBytes The size of the journals in Megabytes. The default journal size is 128 megabytes. The minimum size is 8 megabytes. -j Number The number of journals for gfs2_mkfs to create. You need at least one journal per machine that will mount the filesystem. If this option is not specified, one journal will be created. -O This option prevents gfs2_mkfs from asking for confirmation before writing the filesystem. -p LockProtoName LockProtoName is the name of the locking protocol to use. Acceptable locking protocols are lock_dlm (for shared storage) or if you are using GFS2 as a local filesystem (1 node only), you can specify the lock_nolock protocol. If this option is not specified, lock_dlm protocol will be assumed. -q Be quiet. Don't print anything. -r MegaBytes gfs2_mkfs will try to make Resource Groups about this big. Minimum RG size is 32 MB. Maximum RG size is 2048 MB. A large RG size may increase performance on very large file systems. If not specified, mkfs.gfs2 will choose the RG size based on the size of the file system: average size file systems will have 256 MB RGs, and bigger file systems will have bigger RGs for better performance. -t LockTableName The lock table field appropriate to the lock module you're using. It is clustername:fsname. Clustername must match that in clus- ter.conf; only members of this cluster are permitted to use this file system. Fsname is a unique file system name used to distin- guish this GFS2 file system from others created (1 to 16 characters). Lock_nolock doesn't use this field. -u MegaBytes Initial size of each journal's unlinked tag file -V Print program version information, then exit. [ block-count ] Make the file system this many blocks in size. If not specified, the entire length of the specified device is used. EXAMPLE
gfs2_mkfs -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/mygfs2 This will make a Global File System on the block device "/dev/vg0/mygfs2". It will belong to "mycluster" and register itself as wanting locking for "mygfs2". It will use DLM for locking and make two journals. gfs2_mkfs -t mycluster:mygfs2 -p lock_nolock -j 3 /dev/vg0/mygfs2 This will make a Global File System on the block device "/dev/vg0/mygfs2". It will belong to "mycluster" and but have no cluster locking. It will have three journals. mkfs.gfs2(8)
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy