10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Good Morning,
What's a good way to get partition/slice sizes down to the byte on Solaris 9? I've tried a few ways, but only see results like 8.21GB which rounds the number.
Thanks! (5 Replies)
Discussion started by: Stellaman1977
5 Replies
2. Shell Programming and Scripting
Hi ,
I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ?
/tmp
file1.txt
file2.txt
ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt
cat output.txt
file1.txt
file2.txt
output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies
3. UNIX for Advanced & Expert Users
Is it better to use df or du to calculate directory sizes? I tried both and got different numbers with both.
$ du -h /home
1.7G /home/bob1
1.7G /home
$ df -h /home
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VG-lv_home
25G 1.9G 22G ... (2 Replies)
Discussion started by: cokedude
2 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: mrreds
2 Replies
5. Shell Programming and Scripting
I have 2 big files in the size of gb. They are same with respect to content, both are “,” delimited. Now both of them are created by two different processes but has the same logic. The problem is they are differing only in few bytes for e.g one file is 202195751 bytes other is 202195773. So... (2 Replies)
Discussion started by: dsravan
2 Replies
6. UNIX for Dummies Questions & Answers
Hello everyone,
can anybody help me in finding a way to obtain a list of all the directories and their sizes.
I would like to be able to run this and obtain an output like a tree structure with each branch saying how much space it is taking up .
Hope you can point me in the right direction.... (1 Reply)
Discussion started by: gio001
1 Replies
7. Shell Programming and Scripting
I have the following script:
#!/usr/bin/ksh
export MDIR=/datafiles
NAME=$1
SERVER=$2
DIRECTORY=$3
DATABASE=$4
ID=$5
export dirlist=`/usr/bin/ssh -q $ID@$SERVER find $DIRECTORY -type d -print`
for dir in $dirlist
do
SIZE=`</dev/null /usr/bin/ssh -q $ID@$SERVER du -ks $dir`
echo... (6 Replies)
Discussion started by: la_womn
6 Replies
8. Shell Programming and Scripting
Hello every one,
Iam newbie to this forum and shell programming &scripting.
i needed to compare each and every folder of two separate servers.
Actually I have copied some directory structure from one server to second server, to build on second server the files all should be copied... (3 Replies)
Discussion started by: mannam srinivas
3 Replies
9. Shell Programming and Scripting
Hi, Need help for a Script for checking and reporting database file sizes in a directory.
Request you to please give your valuable inputs.
Thanks a lot in advance.
Best Regards,
Marconi (1 Reply)
Discussion started by: marconi
1 Replies
10. UNIX for Dummies Questions & Answers
Hi I need to take a list of files that are defined by an ls -ltr or grep for particular file names - and add up the byte size colum which is field 5 seperated by a space.
I tried to do this but I think I am way off:
for file in 'ls -ltr | grep 20070916 | nawk -F" " '{temp+=5} END {print... (1 Reply)
Discussion started by: llsmr777
1 Replies