•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Users Lounge section within the Tech Talk category of DaniWeb, a massive community of 456,553 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,493 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Users Lounge advertiser: Lunarpages Linux Web Hosting
Views: 6708 | Replies: 3
![]() |
| |
•
•
Join Date: Oct 2006
Posts: 159
Reputation:
Rep Power: 3
Solved Threads: 0
Hi,
I the following two command give the names of the folder of files on the desktop which have their size in MB or GB, am I right?
[root@localhost Desktop]# du -h |grep M
[root@localhost Desktop]# du -h |grep G
What do I need to use as a command to get the name of the files/folders within a particular range in terms of size ie MB or GB? If I want to know the names of the files/folders on the desktop that are larger than 5 MB but less then 10 MB in size? Thanks..
I the following two command give the names of the folder of files on the desktop which have their size in MB or GB, am I right?
[root@localhost Desktop]# du -h |grep M
[root@localhost Desktop]# du -h |grep G
What do I need to use as a command to get the name of the files/folders within a particular range in terms of size ie MB or GB? If I want to know the names of the files/folders on the desktop that are larger than 5 MB but less then 10 MB in size? Thanks..
•
•
Join Date: Oct 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 2
•
•
•
•
I the following two command give the names of the folder of files on the desktop which have their size in MB or GB, am I right?
[root@localhost Desktop]# du -h |grep M
[root@localhost Desktop]# du -h |grep G
Well, yes and no, you get ALL lines displaying a 'M' or a 'G'. That is, files like 'superMarket.sh' or
'GreyFloor.jpg' would also be printed. It will also do the check recursive, so if you just want the size of the things actually "on" the Desktop to be printed, you'll have to ad the option '-s' to du (for more info check #man du).
Unfortunately I can't come up with any good solutions, but hopefully someone else will help you with the rest of the cake.
/jansson
![]() |
•
•
•
•
•
•
•
•
DaniWeb Linux Users Lounge Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple bbc cd cellphone choose code computer core debian dell desktop development drivers enterprise fedora fiji games gentoo gpl hardware ibm infrastructure install kernel laptop linux marketing microsoft mobile news novell open open source openoffice operating os palm preinstall red hat rhel security server source sun system ubuntu unix vista web windows
- How to Change the Default Icons for Folders in Windows XP (Windows tips 'n' tweaks)
- How to validate an image field with javascript (JavaScript / DHTML / AJAX)
- File size in C (Win32) (C)
- please help me remove winfix. here is my log file from Hijack this (Viruses, Spyware and other Nasties)
- Any advice about folder size viewer (Windows NT / 2000 / XP / 2003)
- Smart CD-Menu Creator (Geeks' Lounge)
- Set, View, Change, or Remove Special Permissions for Files and Folders in Windows XP (Windows tips 'n' tweaks)
- i have a dialer or something running in background.. (Web Browsers)
- can't find file size over 3 megabytes to clean up harddrive (Windows NT / 2000 / XP / 2003)
Other Threads in the Linux Users Lounge Forum
- Previous Thread: Why use Linux over windows ??
- Next Thread: gcc 4.2.2 on openSUSE 10.2



Hybrid Mode