Debian :: Du Command Without 1024 Block Size

Aug 20, 2011

i'm calculating the size of directories using "du"

PHP: function du($path)
{
exec ('du -sb ' . $path, $res[]);
$size = $res[0][0];

[Code].....

But then again, it doesn't calculate the actual file size, but rather a size aligned to 1024 bytes just as Windows does that with 4096 bytes cluster size. Is there a way to calculate the actual file size? eg. 1021 bytes

View 7 Replies


ADVERTISEMENT

Ubuntu :: Command To Get Block Size?

Mar 1, 2010

In a book, I read tha cmchk command is used to get the disk block size. But in Ubuntu, it is not allowed as command is not available.Can some body tell me what is its equivalent in Ubuntu.

View 4 Replies View Related

Ubuntu :: Unity & Netbook Display Size - Applications Are Oversized For The 1024 X 600

Apr 26, 2011

I upgraded to 11.04 about 10 days ago. I have this intermittently weird problem where some of the applications, some of the time, are oversized for the 1024 x 600 display. I can't get to the buttons on the bottom end of the screen, and the window refuses to decrease in size enough so that it all fits on. So far, I've had this problem with Evolution, Pytrainer, Gimp, and another one that escapes my memory.

Has anyone else had this issue? (Except for the Evolution bug, which has been around since 2005 or thereabouts. How on earth is that thing still the default when nobody bothers to fix it up?) how to a workaround? Heck, I don't even know where to go to report this kind of bug.

View 2 Replies View Related

SUSE :: Change The HD Block Size

Nov 24, 2010

Does anyone have a guide/instructions to change the Block Size on a Linux disk from 4096 bytes to 1mb or more?

View 2 Replies View Related

General :: Dd Block Input/output Size?

Mar 8, 2010

I'm trying trying to understand dd, and I'd like to know why frequently do we have to use a block read/write size, like "dd bs=1024", "dd ibs=512"... If it executes the operation byte by byte, isn't it irrelevant? What is this block size then?

View 6 Replies View Related

Programming :: C Program - Getting The Raw Size Of A Block Device

Oct 16, 2010

How do you go about getting the raw size of a block device under Linux from within a C program? And I mean the raw size of the block device itself, not a file system that may or may not be installed on it. And I'd like to be able to get the raw size of any block device, from hard drives (e.g., /dev/sda) to LVM partitions (/dev/mapper/vg0-home) to loop devices to anything else that is a Linux block device.

View 3 Replies View Related

General :: Block Size For Disk Cloning With Diskdump (dd)?

Jan 17, 2011

I use dd in its simplest form to clone a hard drive dd if=INPUT of=OUTPUT However, I read in the manpage that dd knows a blocksize parameter. I was wondering whether there is an optimal value for the blocksize parameter that will speed up the cloning procedure?

View 4 Replies View Related

General :: Cannot Mount Ext4 Fs With Block Size Of 65536

Feb 5, 2011

I am doing some benchmarking on EXT4 performance on Compact Flash media. I have created an ext4 fs with block size of 65536. however I cannot mount it on ubuntu-10.10-netbook-i386. (it is already mounting ext4 fs with 4096 bytes of block sizes) According to my readings on ext4 it should allow such big block sized fs. I want to hear your comments.

[Code]...

View 2 Replies View Related

Ubuntu :: Mounting NTFS Changing The Block Size?

Mar 31, 2010

I have reformatted my hard drive with allocation size 64K for a better performance on my WDTV HD media player(dealing with large files). When I mount this drive on Linux, the mount tells me that "blksize=4096".If I keep writing files usinghis default etting(blksize=4096) to my NTFS formatted hard drive, will my WDTV be able to benefit from the performance improvement of 64k allocation size ? Should I try and mount my hard drive with a larger blksize ?I did some research on google but couldn't find an option to increase the blksize when mounting an NTFS pre-formatted drive.

View 1 Replies View Related

General :: Block Size Explanation In Plain English?

Apr 8, 2011

what block size means in plain English? I know block size 4k has 2 TB of file size limit and 1024 has around 17 GB. How do they calculate this?

View 3 Replies View Related

General :: Mount An NTFS Drive Which Has A Different Block Size?

Mar 31, 2010

I have reformatted my hard drive with allocation size 64K(formatted on windows with 64k setting) for a better performance on my WDTV HD media player(dealing with large files).When I mount this drive on Linux, the properties tells me that"blksize=4096".If I keep writing files using this default setting(blksize=4096) to my NTFS formatted hard drive, will my WDTV be able to benefit from the performance improvement of 64k allocation size ?I am confused, Does it have anything to do with "blksize=4096". ?Should I try and mount my hard drive with a larger blksize ?I did some research on google but couldn't find an option to increase the blksize when mounting an NTFS pre-formatted drive

View 1 Replies View Related

Programming :: Provide A Block Size To Open An Archive?

Jul 12, 2011

Here [URL].. it says that you need to provide a block size to open an archive. What does that mean, and what would be a good number to use?

View 1 Replies View Related

General :: Cannot Mount Hard Disk: Block Count Exceeds Size Of Device

May 11, 2011

I have one hard disk (call her HDA) that contains nothing but a single ext4 partition containing a backup of all my important data. Last night I did a clean install of Ubuntu 10.10 on my primary hard disk (call her HDB) and from there proceeded to upgrade directly to Ubuntu 11.04 upgrade. In 10.10, I was able to read HDA just fine. However after the upgrade, I can no longer mount this drive. When mounting from file browser:

Code:

Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sda,missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so The end of dmesg said the following:

Code:

dmesg | tail
[ 82.130904] EXT4-fs (sda): bad geometry: block count 122096646 exceeds size of device (122096381 blocks)

my hard disk has a block count greater than the size of my device. I've done my background searching on this and tried a command line utility I've never heard of before:

Code:

# sudo e2fsck /dev/sda
e2fsck 1.41.14 (22-Dec-2010)
The filesystem size (according to the superblock) is 122096646 blocks
The physical size of the device is 122096381 blocks

[code]....

this is as far as I've gotten. This drive holds over a decade's worth of work for me and is extremely valuable. I really didn't think that the Ubuntu upgrade process would mess with this drive, seeing as the Ubuntu install was contained on an entirely different drive. What is it that I need to do to restore my drive to working status?

View 9 Replies View Related

General :: Generate Random List And Determine Size Of Arbitrary Block Of Files In Dir?

Mar 4, 2010

I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.

View 2 Replies View Related

Debian Multimedia :: How To Change Icons Size And Gaps Size

Oct 22, 2015

today I upgraded via official testing repository Gnome to version 3.18. After this, icons on desktop and nautilus are bigger, than before. Next thing, gaps between icons are smaller than before. I tried change theme to default (Adwaita), then run gtk-update-icon-cache, but without result.

Normal view - icons are big for this view. URL....

Small view - icons are still big for this view. URL...

How can I change icons size and gaps size? Or is it bug for this version?

View 2 Replies View Related

General :: Which Command Is Used To Block Tcp Port

Mar 26, 2010

i want to block tcp port with the help of iptables commands linux.which command is used for this purpose?

View 2 Replies View Related

Ubuntu :: Terminal Command To Block All Internet Connections?

Apr 16, 2011

I am trying to write a shell script that will block any outgoing Internet connection, focusing mainly on the HTTP connections.

It would be nice if this command could work on both Mac OSX and Linux.

View 8 Replies View Related

Ubuntu Servers :: Bash Seem To Block Vsftpd Conf Command

Mar 16, 2011

I am new on ubuntu and I really don't have any background on making a server. To be frank is I am still a student learning ubuntu server, how to make and configure them.

My problem is that whenever I type the command:
/etc/vsftpd.conf
an error message says that:
-bash /etc/vsftpd.conf: Permission Denied

I am still discovering what are the commands on the vsftpd server. By the way I am using the server on VMware.

View 3 Replies View Related

General :: Corrupt Oracle Data Block Manually Using Dd Command From Sysem?

Mar 1, 2010

How can I corrupt oracle data block manually using dd command from Linux?

View 2 Replies View Related

Server :: Command For Iptable Rule To Add In Chain RH-Firewall-1 To Block Ftp Port?

Mar 10, 2011

tell me the command for iptable rule to add in Chain RH-Firewall-1 to block ftp port & the ftp server was configured in public ip address,i searched in google but i did'nt get the exact command for iptables rule in Chain RH-Firewall-1.

View 3 Replies View Related

Debian :: "Not Optimum Mode - Recommended Mode 1280 X 1024 60Hz"

Apr 19, 2010

I am getting a pop up window saying: "Not optimum mode. Recommended mode 1280 x 1024 60Hz" In my case, this is happening after installing Debian 504 AMD64, the Samsung "SyncMaster 940N" that gives this message or warning was working fine for a few years on another machine under the previous Lenny distro.

The only way to get rid of this unwanted pop-up window (the monitor is working fine) is to press the "AUTO" switch on the monitor, there is no such option in the menu of the monitor to disable anything or change the resolution and it seems to me that, unlike what was suggested as an answer in similar threads, the problem is not with the monitor but with the distro unable to detect the monitor properly. The only mention in the "xorg.conf" file is as follows and running "dpkg reconfigure ..." has no other effect than creating a new exact duplicate of the file.

Section "Screen"
Identifier"Default Screen"
Monitor"Configured Monitor"
EndSection

View 5 Replies View Related

General :: Evaluate Size Of Output Command?

Nov 18, 2010

I'm trying to do something like this:

Code:
#!/bin/bash
cmd1=$(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62)
if $cmd1 != 0; then echo 'okay'; fi

however i'm messing up somewhere... bash attempts to evaluate the elements in cmd1. when I try to run this script it complains saying:

Quote:

test1.sh: line 5: blocked: command not found

I am open to alternatives. My intent is to replace cat /var/log/messages with dmesg, so I can attempt to determine if a problematic application I use encounters a blocked state (unresponsive for more than 120 seconds).

Should I be using a different test condition? I tried something like:

Code:
# this declares cmd1 as an array
cmd1=($(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62))
#attempt to determine if number of elements in array is greater than zero
if ${#cmd1[@]} > 0; then echo okay; fi

But I get the same error... what am I doing wrong?

View 3 Replies View Related

General :: Bash Command For Getting L2 And L3 Cache Size?

Sep 4, 2010

How do I get the L2 and L3 cache size?

View 4 Replies View Related

General :: Finding Folder Size Using Command

Oct 26, 2009

I want to know is there a command to find size of a folder.

View 4 Replies View Related

Red Hat :: File Size Varies With Same 'ls -lh' Command Ran On Two Different Versions?

Oct 22, 2010

I ran ls -lh for same tar ball file on RHEL 3 and RHEL 5.3 box. The sixth column of ls -lh output threw 6.3G on RHEL 5.3 box and 16E on RHEL 3 box. Both the machines have ext3 file system.

Find below the output for RHEL 3 and RHEL 5.3 respectively :

2.0T -rwxr-xr-x 1 root root 16E Oct 20 10:34 bac.tar.bz2
6.3G -rwxrwSrwx 1 root root 6.3G Oct 20 10:34 bac.tar.bz2

Do we know how 'ls ' deals with larger numbers ?

View 6 Replies View Related

General :: Show Size Of Folder Contents In Ls Or Some Other Command

Sep 29, 2010

I know these folders each have >80gb of files. Yet, they only show 4.0K in ls -lah? How can I have ls show size including the contents?

[root@aapsan01 aapxen01]# ls -lah
total 48K
drwxrwxrwx 6 root root 4.0K Sep 29 03:45 .
drwxrwxrwx 15 root root 4.0K Sep 27 09:15 ..

[Code]....

View 4 Replies View Related

Ubuntu :: Command To Show Tree Size Information?

Apr 24, 2010

I'm trying to find a command or program to show what files and folders are taking up the most space on the hard drive, much like tree size view on windows, is there and equivalent on linux?

View 2 Replies View Related

General :: 512KB Maximum Transfer Size Per Command?

Apr 7, 2011

I'm using fc14 and the SG driver to test some SCSI (SAS) targets. In doing so, I'm bumping up against what appears to be a 512KB maximum transfer size per command. Transfers up to 4MB sometimes work, but often they result in ENOMEM or EINVAL returned from the write() function in the SG driver. I could not find any good documentation on how the SCSI system in Linux works so I've been studying the source for drivers in drivers/scsi.

I see that there is a scsi_device struct that contains a request_queue struct that contains a queue_limits struct that contains an element called max_sectors. The SG driver seems to use this to limit the size of the reserve buffer it is willing to create. I see that there are several constants used to initialize max_sectors to 1024 which would result in the 512KB limit I see (with targets having 512 byte sectors). At this point I have several questions:

1) When the open() function for the sg driver gets called, who initializes the scsi_device struct with the default values?

2) Can I merely change the limits struct to arbitrary values after initialization and cause the SG ioctls to set the reserve buffer to allow greater values?......

View 2 Replies View Related

General :: 'cd' Command Increases Size Of Shell Propmt?

Sep 10, 2010

When i change the directory using 'cd', the length of my shell prompt keeps on increasing. To make it more clear kindly see below

Code:
$> cd MyWorks
$ Myworks> cd Shell

[code]....

View 8 Replies View Related

General :: Command Line Options - Listing MP3 Over Certain Size

Jan 6, 2011

How would I list every mp3 over a certain size on an entire hard drive?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved