The tag has no wiki summary.

learn more… | top users | synonyms

43
votes
14answers
28k views

Determine the size of a block device

How can I find out the size of a block device, such as /dev/sda? Running ls -l gives no useful information.
27
votes
3answers
3k views

What does size of a directory mean in output of 'ls -l' command?

What does size of a directory mean in output of ls -l command?
20
votes
1answer
18k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
10
votes
5answers
7k views

How to limit log file size using >>

How can I limit the size of a log file written with >> to 200MB? $ run_program >> myprogram.log
9
votes
5answers
4k views

Keep log file size fixed without logrotate

Is there any way to keep file size of log file fixed without rotating it by a new empty file and deleting (or archiving) the old file. For example, if I set log file maximum size to 1MB, after the ...
7
votes
5answers
509 views

copy smallest files first?

I have a large directory containing subdirectories and files that I wish to copy recursively. Is there any way to tell cp that it should perform the copy operation in order of file size, so that the ...
7
votes
1answer
562 views

How to re-size virtual disk with installed Linux system?

I've got hard system configuration there and I don't want to re-install it again but I need more space now. Current system space is 30GB. Seems like it's not possible to re-size disk so what I need ...
7
votes
1answer
513 views

Raspberry Pi, serial console, minicom, and gnome-terminal

I'm trying to access my raspberry pi via its serial console on the gpio pins. It's working fine through a USB-3.3v serial dongle. However, there's a problem with long lines and long screens not ...
6
votes
4answers
5k views

Delete files of certain size range

I want to delete files which size is between certain values. For example I have the following list of files: -rw-r--r-- 1 smsc sys 558 Apr 30 13:07 stats.sfe.1.20120430130513.xml.Z -rw-r--r-- 1 smsc ...
6
votes
1answer
582 views

Why could the size of the “dot” file “.” exceed 4096?

Today I found an "empty" directory with a size of 4MB. It had no visible contents, so I tried ls -lah. This showed me some hidden files (not very large). Searching for the reason why the directory ...
6
votes
2answers
185 views

du command show a slash after directories?

How to use du command show a slash after directories? For example: du -ab /root/test/php-5.4.8/ Result: 1781 /root/test/php-5.4.8/main/internal_functions.c.in 973596 ...
6
votes
2answers
19k views

Increasing Screen Size/Resolution on a VirtualBox Instance of Centos

I have VirtualBox instance of Centos 5. The screen size is quite small (800*600) and I'd like to increase it to 1280*1080. Under the Gnome preferences for "Screen Resolution" I only get the option for ...
6
votes
1answer
94 views

Determining a CD-R(W)'s capacity

I've seen various questions asked (and answered) regarding how to detect the size of various media on a GNU/Linux system, and in particular how much space has been used on an optical drive. But is ...
5
votes
3answers
6k views

Find the total size of certain files within a directory branch

Assume there's an image storage directory, say, ./photos/john_doe, within which there are multiple subdirectories, where many certain files reside (say, *.jpg). How can I calculate a summary size of ...
5
votes
1answer
683 views

find . -size -1GB in Centos

In Centos, I have a text file in my home directory. The command find . -size -1M doesn't show my file but find . -size -1000k does show it. This problem just seems to be happening when I use the ...
5
votes
1answer
544 views

Why is this empty directory 3.5MB?

I've just read this question: What does size of a directory mean in output of 'ls -l' command? ...which doesn't quite answer my question. Basically, I'm moving files onto a NAS. The folders ...
4
votes
3answers
1k views

Is there a command to list the compressed file sizes for files within a .zip file?

I'd like to see the absolute size in bytes of each file that has been compressed into single zip file. Having read the zip man page, I'm not sure that that utility can do it. This is on Mac OS X. ...
4
votes
2answers
508 views

`du` get different results on different machines for the same folder

I have a folder(which contains a lot of sub-folders and files) on a machine, I used du -m and it shows the disk usage of all sub-folders and files, anyway, the overall disk usage is 78M I ...
4
votes
3answers
2k views

In SciTe (Scintilla), how can I create Syntax-Highlighting for my own custom language?

I want to create a custom Language, with its own custom Syntax Highlighting. Notepad++ (a Windows SciTe/Scintilla based Text-editor), allowed me to create a custom "Language", and now, in Linux, I ...
3
votes
2answers
268 views

How can I find the actual (dd) size of a flash disk?

When I put a flash disk into a card reader and make an image with dd, I see the actual size of the disk, like 512483328 bytes in the following example: 1000944+0 records in 1000944+0 records out ...
3
votes
2answers
2k views

How to resize an IMG file's partition info?

I made an ISO this way: sudo partimage save /dev/sdc1 /media/56AE8240AE82191F/Backup/xfcefat.iso The resulting iso file is very small but when mounted I see that it has correctly preserved the ...
3
votes
4answers
1k views

How to get size of a block special file?

I need to be able to determine the size of a block special file. For example, given /dev/sda, I need a command that will provide the size of the device. (By size I mean capacity, since this is a ...
3
votes
3answers
751 views

limiting size of logfile from a variable

How can I limit the size of a log file, which is saved in the form of 'foo.txt', from within a bash script please? I want to put in the variables 'LOGFILE=50 mb' and it uses that size, or whatever ...
3
votes
4answers
155 views

How to get folder size ignoring hard links?

I use rsnapshot for backups, which generates a series of folders containing files of the same name. Some of the files are hard linked, while others are separate. For instance, hourly.1/file1 and ...
3
votes
2answers
165 views

dot instead of comma as thousand separator

I read about --blocksize for ls to get a thousands separator. However my computer gives me dot (.) and not comma (,): $ ls -l --block-size="'1" total 11.893.190.656 -rw------- 1 carlah users ...
3
votes
1answer
385 views

Log file not growing beyond a size. Why?

We have a java based web-app running on CentOS 6.0 64bit and it writes out many log files. Some of the files are rotated on daily basis using logrotate using the daily, copytruncate and other few ...
3
votes
2answers
357 views

Fastest way to get list of all file sizes

I'm trying to create a graph of the distribution of file sizes on my ext4 system. I'm trying to write a script to scrape this information from my computer somehow. I don't care where the files are ...
3
votes
1answer
319 views

HP-UX SZ limit for ps?

Right so I have a fun little thing that I'm deathly confuzzled about. I have a program that is running and I am getting the following: using top: SIZE RES 1639M 359M using ps: SZ 20171 ...
2
votes
2answers
5k views

How to Expand LVM2 Partition in Fedora Linux

I've been using Fedora 15 on a VMWare virtual machine. Over time, the disk space I initially allocated for the file system began to run out, only 12GB left. I've expanded the disk space an extra 25GB. ...
2
votes
3answers
307 views

How to get the distribution of file sizes?

I'd like to know the distribution of file sizes under a certain directory. Please note: distribution of file sizes, not size of a directory. That means I want to know there are 25 files of 60 bytes, ...
2
votes
2answers
42 views

How to display size of each file next to it after executing the “locate” command?

Is there anyway to display the size of each file next to it after executing the "locate" command?
2
votes
1answer
156 views

Disk is almost full on a server with CPanel

I have VHM system and I have a domain and two subdomain on this system. I tried to take a backup than after sometime I cannot access cpanel but I can access VHM. but some of the VHM options gives disk ...
2
votes
2answers
167 views

Resize vdi size doesn't work as supposed [duplicate]

I just installed the new one Debian xfce via VirtualBox, but decided to increase the vdi size from 8GB to 20GB (because it requires 42% of all disk space at this moment): VBoxManage.exe modifyhd ...
2
votes
1answer
346 views

KSH : cp only based on file size

I would like to write a small script copying from a directory A to directory B all the files with the .log extension. So in my directory A, I've : ls : a.log b.log c.log Here is the pseudo-code I ...
2
votes
1answer
74 views

Why is df -h size, util and dispo not corresponding to each other

When I'm using the command "df -h" I'm having the following output : Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora-root 20G 9,4G 8,8G 52% / devtmpfs ...
2
votes
2answers
2k views

Must the filesystem be unmounted while extending an LVM logical volume?

I have seen some tutorials on extending an LVM2 logical volume. None of them instruct you to unmount the filesystem. They claim that you can extend an LVM volume while it is in use. Is this right?
1
vote
2answers
120 views

LINUX: How to calculate recursively the size of each sub directory up to root directory?

I have written this script Scrit in Linux. I now need to know the size for each sub directory with the condition -atime +${DAYS} searching down from directory $DIR. The result should be gathered in ...
1
vote
1answer
75 views

brasero.toc.bin is very big — why?

I have a file in my home directory: brasero.toc.bin, which ls gives as: -rw-rw-r--. 1 Harry Harry 633M 2013-09-26 15:53 brasero.toc.bin in fact it is the second largest file listed, only sdc at ...
1
vote
2answers
852 views

Change the size of my memory pages?

I would like to change my kernel's page size from 4KB to 4MB as I have had a large addition of RAM to my computer and I am never running out of anymore. The idea is that programs requiring large ...
1
vote
3answers
645 views

How to find all disks & their size before using them?

I need to know the following information, before using the harddisk to create logical volumes or database.. Any perl modules or snippet would be of great help. how many hard disks are presented to ...
1
vote
2answers
175 views

Free disk space from a JBoss log file which is still being written to

Is there any locking on the content, imposed by the process if at all the process is using the file. We host a JBoss app server on a RHEL 6.4 OS and due to the disk space constraints we have decided ...
1
vote
1answer
1k views

Merging flv files causes a massive size increase

I have 3 flv files which I wish to merge. I used the answer in this post: Merge multiple flv files? which suggested this option: mencoder -forceidx -ovc copy -oac pcm -o output.flv input1.flv ...
1
vote
1answer
101 views

changing the partition of a linux

I have a ubuntu system as a virtual system on Virtual Box. It uses VHD as its hard disk. I manged to change the size of VHD using VHD resizer, now I want to expand the partition on vhd so it uses the ...
1
vote
1answer
326 views

Tiny font on Fedora 16

I'm finding that several programs have tiny font with Fedora 16. Google Chrome, for example, has miniscule font in the tabs. MATLAB has tiny font in the menus (File, Edit, etc.) I have the "larger ...
1
vote
0answers
45 views

How do I make get-iplayer produce watchable quality without huge filesize?

Summary findings: I'm using get-iplayer v2.82. The files I produce on hard drive are all mp4. I've discovered the following (downloading same TV program in both cases): Using --modes=flashstd and ...
1
vote
0answers
145 views

How to set up screen resolution permanently

I just installed Fedora 19 on a VirtualBox and when I started it for the first time it only allowed the screen resolution 1024x768 After some research I managed to install the guest additions and I ...
1
vote
0answers
53 views

Why is the current device size bigger that the current volume size after resizing an ntfs partition?

I'm resizing an ntfs partition using ntfsresize (ntfs-3g) and fdisk. I used the following command in order to change the filesystem size: # ntfsresize -f -s 10G /dev/sdb1 ntfsresize v2013.1.13AR.1 ...
1
vote
0answers
31 views

Change the size of a specific context menu entry?

Is there a way to change the size of one specific context menu entry of GTK+ applications? Preferably without requiring superuser privileges. Why? In some applications, I use one specific context ...
1
vote
0answers
61 views

How can I make Krusader show real size of symlinked files?

In the "size" column in Krusader, there is a link's size noted, instead of the size of the actual file. This is the same as what ls -l shows (the full address of the target file, e.g. 64 B instead of ...
1
vote
0answers
36 views

Directory size as reported by stat on NTFS

We all have seen gazillions of directory size reports from ls or stat. We know they don't mean real size of the content, but they do have meaning, but since the meaning is not very useful for normal ...