Software :: Function To Find The Size Of The Directory?
Oct 26, 2010
Is there any Linux function to find the size of the directory? stat() function can be used only for files and not directory. Can anyone let me know for to find the size of the directory from the C code
View 5 Replies
ADVERTISEMENT
Jul 19, 2011
I wrote a test program for learning usage of realloc() and I thin I did everything right but I get this error exactly with my 4th time that while tries to reallocate memory in MakeDSt function for DSt->SArray:
Quote:
realloc(): invalid next size
this is my complete code :
Code:
#include <stdio.h>
#include <stdlib.h>
typedef struct DRA
{
code....
View 2 Replies
View Related
Jun 5, 2010
I have a Canoscan LiDE 30 scanner which works fine in Linux. I haven't used it in months, and never since moving from Jaunty x86_64 to Fedora 11 x86_64. This evening I suddenly need to scan two pages to send to someone via e-mail, and the recipient is desperate to receive them. Naturally, Xsane has decided this is the moment to screw me.
The problem: I cannot figure out how to tell Xsane that the page size is 8.5 11. It insists on scanning only the left side, 3.99 x 11. I cannot find a page size anywhere in any of the buttons.
In Preview I once got it to scan the entire page, but could not figure out how to save the image to file. Subsequently I have not been able to figure out how I did it. In any event, scanning from the small main window always scans 3.99 x 11. Adjusting the scan area manually in the Preview window allows me to change the size area in the small main window to 8.5 x 11, but when I then scan from the small main window it reverts to 3.99 x 11.
I have scanned the document a hundred times at least, each time trying different buttons, but nothing has succeeded in getting the full page.
View 5 Replies
View Related
Dec 3, 2010
I am looking for some smart way to find all the exe's names for the given local function.
We are having thousands of C and Cobol files, and out of this we are creating 100's of exes. Now if I change any one of the function(C or Cobol), I want to know which exe's are going to be impacted.
One function written in some file can be called from lot other places, and create separate exes.
View 2 Replies
View Related
Jul 13, 2011
I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively
View 4 Replies
View Related
Oct 12, 2010
I want to populate an array of string by files exists in directory on mounting of file system. I got an entry point for file system mount. I can use either do_mount function or fill_superblock function. But I am not clear about how to call readdir from there itself. I need inputs for calling readdir from fill_superblock function.
View 2 Replies
View Related
Feb 14, 2011
This should be a simple thing to accomplish, but I can seem to figure it out. Essentially, I want to have a bash alias or function that will let me recursively grep the current directory. A while back I added this to my .bashrc:
Code:
alias rg="grep -r --exclude=*/.svn/* --exclude=*.swp"
This works fine, (and also ignores any svn and vim swp files), and I can call it like:
Code:
rg foo *
However, 99.999% of the time, I am only interested in searching in the current directory, so the "*" is a bit redundant. Also, I would say 5-10% of the time, I am typing faster than thinking and forget the "*", so grep just sits there trying to read from stdin. It's a pretty minor thing, but ideally I'd like to be able to just type:
Code:
rg foo
I've tried creating a function to handle this:
Code:
function rg(){
grep -r --exclude=*/.svn/* --exclude=*.swp $1 *
}
but it behaves exactly the same as the alias above. escaping the "*" with 's doesn't work, and neither does trying `pwd` (or even a hard-coded path) in its place.
View 2 Replies
View Related
Mar 2, 2011
I have 2 directories in my home folder that I would like to set a size limit on. The directories are ~/backup and ~/temp. Is there an easy way to limit the size of a directory without having to make partitions?
View 4 Replies
View Related
Jun 14, 2011
I need to set size limit for shared directory. Actually i am unable to set directory size for my NFS shared foldermy Dir locate in /root/ESSR_logex : This ESSR_log Directory size should be 20GB. that mean NFS client only can store up to 20 GB files. NOT MORE
View 4 Replies
View Related
Jan 4, 2011
Is there any way we could display dicrectory's size in terminal? Because I need to copy directories to external devices like USB, so I need to know there is enough space left on my USB for those directories or not. I tried ls command but still couldn't find out.
View 2 Replies
View Related
Sep 28, 2010
I have a 4gb USB thumb drive with Ubantu 9 on it and it looks like I have over 3gb free but I only have 4mb free in the documents Directory. w do I increase the size of the directory so I can add my Doc files?
View 3 Replies
View Related
Aug 5, 2011
As example, I have directory in /root called as "shared". i already shared this directory using NFS. i want to limit this directory size into 20 GB(20*1024*1024).That means "shared" directory reserved 20 GB disk space from the HDD.how can i solve this problem
View 3 Replies
View Related
Nov 10, 2009
We have a problem where there is not enough space in our /tmp partition. We are trying for fix our mysql database, and keep running in to the space issue... the error we are getting says:
myisamchk: Disk is full writing '/tmp/STGL3SGd' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
Our /tmp partition is current set at 485M, but it is not large enough to handle the database fix...
Does anyone know of a work around - perhaps to assign different directory for the temp files?
View 3 Replies
View Related
Nov 11, 2010
How can I calc the size of the tmp directory in all account. Do the following will calc each dir alone code...
View 1 Replies
View Related
Dec 31, 2010
I was trying to encrypt a USB flash drive, but truecrypt shows me two usbs. Here is wht is says Quote:/dev/sdb: and then it says the size is 3.7GB and then the mount directory is blank.owever is also list another one that says Quote:/dev/sdb1 the size is 3.7Gb and the mount directory is /media/USB20FDI have a PNY 4GB flash drive.
View 6 Replies
View Related
Feb 12, 2010
.I want to increase the /home directory size. How can I do that.I have copied all the files into another directory.
View 7 Replies
View Related
Jun 21, 2011
I need to increase the size of my /home directory. I am working with Ubuntu(2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 i686 i386 GNU/Linux
I checked the partitons with df -h command...the output is :
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 11G 4.3G 6.2G 42% /
none 1001M 560K 1000M 1% /dev
none 1006M 188K 1006M 1% /dev/shm
[Code]....
Clearly /usr has loads of space here...and I dont know /home is mounted with which partiton...I read somewhere that tune2fs command could be useful here...I dont want to experiment and mess up here..
View 4 Replies
View Related
Jan 21, 2010
What is the minimal size for a home directory?I did a manual partition install in VirtualBox. My vdi had these settings: RAM = 500MB & HDD = 10GB.Does this look correct.I am never certain as to the options for Primary, Logic, Beginning and End.Does it matter the order in which you make partitions in Ubuntu?
View 4 Replies
View Related
Sep 27, 2010
Is it possible to increase the size of the root directory / on ubuntu 9.10?
View 5 Replies
View Related
Mar 16, 2010
After installing everything I neded to get on to the web with my server, I discovered that my www dir only has 20 gb.
How can I increase the the size of my directory?
View 6 Replies
View Related
Nov 30, 2010
I have this directory with multiple images 'pics' and the size is 20mb and I want to make a .zip or .rar package of this directory but with an increased size so the .zip/.rar file will be 100mb, and then when you extract it the file size is the original 20mb. I want to make the result file bigger, no compress it. I need to put all the directory in one single file .zip or .rar but it has to weight more (100mb), maybe it can be done with another application. By the way, I have a centos 5 from command line.
View 2 Replies
View Related
May 19, 2011
I am running Debian under virtual container. I need to set max size of directory for each of vsftpd virtual users - because they are virtual, I cannot use user quotas. I was wondering, if I could create images with filesystem and mount them, but I cannot access /dev/loop device from container. Is there any other way, how to set max directory size in virtual container
View 2 Replies
View Related
Jul 8, 2011
Just installed Ubuntu 11.04, which has Nautilus 2.32.2.1. When more than one directory is open, the tab for each directory s-t-r-e-t-c-h-e-s way across the screen, so all tabs added together take up 100% of the width. So with two folders open, each tab is 50% of the screen width! In previous Nautilus versions, each tab was just normal size. Cannot find a Preference to change this, and Googling for any solution brings up someone's previous query of this nature: [URL] and the fact that no one has responded! Is this an option that can be changed? Anyone come across this new "feature" before?
View 2 Replies
View Related
Jan 20, 2009
I'm trying to write a script that will calculate a directory size and if the size is greater than 4GB, it will send out an email. But I am getting the "integer operation expected" error when it tries to calculate the current disk size. Here's my script.
Code:
TO="user@email.com"
SUBJ="Ready for DVD burning on `hostname`"
MAIL="/bin/mail"
[code]....
View 1 Replies
View Related
Jul 27, 2010
I am using wget (httrack can also do that ...etc) to downloading entire website , but is there any way to find out the size of the website before starting the download.
View 4 Replies
View Related
Jun 8, 2011
To find the space occupied by files modified more than 4 years ago, i tried following.I am wondering if it is right ?
Code:
find /temp -type d ! -name ".*" -mtime +1460 | wc -l |du -sh
I tried this, but this sits there for long time (of couse the path i tried has lot of files) So i am not sure if this is right.
P.S.:
SHELL=bash
OS=RHEL5
View 9 Replies
View Related
Jan 8, 2010
I can display the RPM installed on CentOS 5.4 though:
Code:
#rpm -qa| more
How can I know the size of those RPMs?
View 1 Replies
View Related
May 18, 2010
i need help in this issue how to find files with unusual size and with unusual names of EX : just dots, names ending with space(s),names containing shell wildcard characters, names containing non-ASCII (control) characters
View 3 Replies
View Related
Jan 16, 2010
I cannot find what my hard drive size is and need to know what size is my Ram.
View 4 Replies
View Related
Apr 15, 2010
I made an account under freeshell.org and it has been very satisfactory so far. I recommend everyone getting an account under freeshell.org. But anyways, how do I find files over, for example, 500 KB, in the entire, my shell account?
View 1 Replies
View Related