General :: Get The Summarized Sizes Of Folders And Their Subfolders?
Aug 13, 2010
I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system. But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achieve that?
Let's say I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders.If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system.But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achiev that?
I am using secure delete to remove files from a Debian Linux PC. However, secure delete does not remove folders. This has lead me to look at writing a script that would move files to a predetermined folder for deletion. My plan is as follows:I have a folder on my desktop called shredder where I move the contents of the waste bin to. The script needs to identify all files within the folders and sub folders, within the shredder folder, and move each file to the shredder folder and then delete the folder. At this point secure delete can be used with a command like shred -v -u *.*on the shredder folder.The problem I have is in creating the code to move files from the different folders and then deleting the folders. Note that the names of the files, folders and subfolders will not always be known
lets say I have a project that have generated lots of xml files. Though all these xml files point to a location with the text name TEXT15. I want to change all the files that containts TEXT15 and change it to TEXT16. This actually works for files in a folder but not recursively in all the entire files....perl -pi -c 's/TEXT15/TEXT16/g' ./* but I have many subfolders and within this more subsub folders....i just want to do this recursively.
I want to list my folders and subfolders (recursive) and also show the size of the files in terminal. I started using this:
Code: ls -h -R > /test.txt I got everything but not the size of the folders. Then I tried this: Code: du -h --max-depth=1 > test.txt
Suppose to show me everything, but I can't see subfolders. And this command do not accept recursive. How can I show the size of the files and folders like the second command, but including the subfolders?
Is it possible to make a script that makes a tree of all folders and subfolders and outputs it to either a .txt file or .pdf? All folders except from one shall list 2 levels. The except folder all the way.
I have scripts in folders /opt/apache2/tools/ and also i have another folder called IDM under /opt/apache2/tools. i tried to configure htpasswd for just IDM folder only as below.
bash-3.00# pwd /opt/apache2/tools bash-3.00# ls -al
We talk about 12pt, 14pt font sizes. Do those numbers represent physical size in some unit or number of pixels? I guess it is the former, because same font size looks different for different DPI values, but in what unit? Also a relevant question: does browsers like firefox and chromium use different system of font sizes, because to get the same physical size, I alwasy need to set larger values in firefox than in other applications. Setting dpi and resolution values using about:config has no effect.
I just ordered a 60 G SSD drive which I am going to use as my OS drive to replace the drive below. Can I just use DD to switch ? dd if=/dev/sda of=/dev/sdb (New Drive)
Device Boot Start End Blocks Id System /dev/sda1 * 1 89723 720693248 83 Linux /dev/sda2 89723 91202 11878401 5 Extended /dev/sda5 89723 91202 11878400 82 Linux swap / Solaris
I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.
I tried the commands
Code:
cp water.txt ./*/water.txt cp water.txt ./*/
However these don't seem to work. The latter gives 'cp: omitting directory' errors.
I have a shared NTFS partition ("shared") that I use for data for both Windows and Ubuntu. How can I mount the music folder on shared to $Home/Music, and the Videos folder on shared to $Home/Videos? I want to mount the different folders on the partition to different folders in home.
I have used cp -rl to copy a folder. When measuring the size of the source and of the result of the copy du -sl returns slightly different sizes, even though diff confirms that their content are identical.Both folders reside on the same hard drive, no modifications to any of them have been done between the copy and the measure. I found nothing in the documentation of du and cp which could explain the difference.
kernel 2.6.21.5, GNU (slackware 12.0)I have entered sourceforge.net. The fonts in their pages I find I cannot change their size. Neither ^+ (cntl++) has any effect. And the resolution I have it (/etc/X11/xorg.conf) at 640x480 (in this way I have a really big screen; so, big characters). I can't almost read that tiny characters.
I recently resized one of my Logical Volumes that contained 160MB data from 500MB to 6.5GB. After resizing it, I checked the size of the data via 'du -sh' and found that my data had reduced to 143MB.
Fortunately, I backed up the the 160MB of data on another partition before resizing the Logical Volume. I ran 'diff' on both directories holding the 160MB and 143MB, but there was no difference detected.
how come there is a 17MB difference after resizing?
In case you're wondering how I performed my resize, this is what i did:
How would i go about copying all .jpg or .JPG files from a folder and all its subfolders to my /usr/name/pictures folder? I'm guessing I'd have to use some sort of .[jJ][pP][gG] to get all the pictures from other examples i've seen, but really not sure how to use that in a recursive cp.
I have installed Samba and the Guest only share i've created works, I can connect and view, edit, create, delete files fine... However...I can NOT see or create subfolders.Google searches and playing around for six odd hours and no success...
----------smb.conf-------------- # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed
I'm running OpenSuse 10.3 and I've tried to set permissions on my folder and subfolders from root:root to wwwrun:www. In the shell it shows all folders and files with the correct permissions, but in the GUI it still says root:root and so my web application can't write to it, until I manually set the subfolders permission in the GUI.
trying to set permissions on all subfolders by right clicking the top folder, permissions, setting the desired values, and then clicking the "Apply permissions to the enclosed files. It takes on the top Folder but not on any of the subfolders or their files.How can I set the permissions for all files and subfolders under a top level folder?
in Kmail 2.0.89 and the 2 or 3 versions before that, I have been lost theability to make a new subfolder under the category "KMail_Folders". I canonly make sub-subfolder under any existent one.The Add Folder entry in the menu is greyed when I am in the KMail Folders level.Is that a bug or a feature? (I hope is not the latter...)
i have a folder with 250 subfolders and each one of them has (at least) one image in it (along with other stuff)how can i 1)copy all the images from those subfolders and paste them into one folder together (other than by hand, obviously)?2)optional : copy only the images of a certain size and above?
I started to use mailboxes instead of maildirs on my server. My server is with imapd on slackware.I found out that by Thunderbird I just cannot create sub-folders in my imap directory. My users used to manage their mails into hierarchically organized subfolders.
On our web server I want to have a WebDAV folder and I would like customers to be able to log in with MySQL authentication from our customers database (this I have set up with no problems and it works fine). HOWEVER, I want each customer to have their own subfolder and, having logged in with access to the main WebDAV folder, I want each customer ONLY to be able to access their own subfolder(s). I don't mind them seeing other subfolders exist but obviously I don't want them to have access to other customers subfolders.
OK, of course I could achieve this by adding new WebDAV locations to the httpd.conf for every customer but with a large number of customers httpd.conf will become very large and messy. I have tried applying further restrictions by putting an .httaccess file in each subfolder but that doesn't work - indeed the presence of a .htaccess file oddly prevents users from seeing any other files in the subfolder but has no effect on the access.
The "[SOLVED]" attribute to the How to set defaulter size in RHEL5 thread notwithstanding, the problem really is not solved. I've set my default language to both "C" and to "EN-us" and the problem is that absolutely every single time I print, I have to meander through varying layout print menus to find the "A4" setting and change it to "letter". That, or sacrifice the last two lines on every page because the default size is larger than the actual size. Bad default. It is not unique to Red Hat/CentOS, of course. Same problem exists on Debian and SuSE, too. Why is this such an intractable issue? Why is there not some simple and obvious way to say, "squish all instances of A4 (or "letter") and replace with "letter" (or "A4")!"?