- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to find out big file in current directory/...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 09:48 PM
02-21-2007 09:48 PM
how to find out big file in current directory/ and recently updated file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:10 PM
02-21-2007 10:10 PM
Re: how to find out big file in current directory/ and recently updated file
with
ll|sort -k5,5nr|pg
the largest files will be at the top.
With
touch
find
you can get recently updated file.
hth
regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:10 PM
02-21-2007 10:10 PM
Re: how to find out big file in current directory/ and recently updated file
Applies to files only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:11 PM
02-21-2007 10:11 PM
Re: how to find out big file in current directory/ and recently updated file
To print the name of the most recently modified file in the current directory:
# ls -t|awk 'NR==1 {print $NF}'
To print the largest file in the current directory:
# ls -l|sort -krn5|awk 'NR==1 {print $NF}'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:19 PM
02-21-2007 10:19 PM
Re: how to find out big file in current directory/ and recently updated file
how to (find out big file in current directory/ and recently updated file) in current subdirectory also
Aarun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:26 PM
02-21-2007 10:26 PM
Re: how to find out big file in current directory/ and recently updated file
Actually, to be correct, we should make sure that we select only files and not subdirectories. It's possible, for instance, that a directory's size might be larger than any of the files in the current directory. You also wanted to see all the attributes of the file found. Hence:
# ls -lt|grep '^-'|awk 'NR==1 {print}'
# ls -l|grep '^-'|sort -krn5|awk 'NR==1 {print}'
Also, as a new member, welcome. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2007 10:37 PM
02-21-2007 10:37 PM
Re: how to find out big file in current directory/ and recently updated file
probably best if you read this thread and the answers to your same question in Linux forum at:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1102434
To search subdirectories as well use the suggested find solutions.
Further info can be found via:
man find
man ls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 06:24 AM
02-22-2007 06:24 AM
Re: how to find out big file in current directory/ and recently updated file
thanks every thing works fine
arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 08:42 PM
02-22-2007 08:42 PM
Re: how to find out big file in current directory/ and recently updated file
using only this command is possbile to select the last updated files,inluding subdir, bigger then 10000 bytes (in this case, but you can chnage this value as you prefer).
ll -trR|awk 'NF==9&&$5>10000'
ll -trR = list files in ricursive way ordering by date in reverse mode (newer first)
NF==9&&$5>10000' = list only files (lines with 9 fileds) and with size (filed5) greater than 10000
HTH,
Art