List size information...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers List size information...
# 1  
Old 08-14-2010
List size information...

hi all,


i want to list only the size information and name of the file(s) and directories in current directory ..
# 2  
Old 08-14-2010
Code:
du -sh *

# 3  
Old 08-14-2010
This should get you size and filename.

Code:
ls -l | tr -s " " | cut -d " " -f5,8

.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looping the files for getting the file size information

Am using Linux 3.10 years.txt is input source file which has the list of year like below 2013 2014 2015 2016 Other Input files are XX_TEST1_YR2016_01012018.csv XX_TEST1_YR2015_01012018.csv XX_TEST1_YR2014_01012018.csv XX_TEST1_YR2013_01012018.csv XX_TEST2_YR2016_01012018.csv... (2 Replies)
Discussion started by: weknowd
2 Replies

2. Shell Programming and Scripting

List by size

I am trying to create a script to list files by size. I was able to show a long listing before adding parameters (first comment) but nothing seems to work after trying to add them. If the first or only parameter is -r the output should be descending order by size, if the parameter is anything... (2 Replies)
Discussion started by: wbport
2 Replies

3. HP-UX

List of file name with size

how to get the file name list with size descriptive in hp-ux Required output: permission link user group size(with MB,KB,GB etc) date time name (7 Replies)
Discussion started by: Jewel
7 Replies

4. UNIX for Dummies Questions & Answers

list only size and path

what command should i use for listing only the size and path of files ? (3 Replies)
Discussion started by: g0dlik3
3 Replies

5. Shell Programming and Scripting

Sorting a list of filenames but keeping the path information.

Hi All I've googled around for this and can't see a way of doing it. I have a file that contains a number of records that are layed out something like the following. /path/to/directory/that/contains/a/file/I/need/filename.pdf The path itself can vary both in terms of the names and the... (7 Replies)
Discussion started by: Bashingaway
7 Replies

6. UNIX for Dummies Questions & Answers

How to list files which have same size?

Hi guys, I need to do 100 files comparison after I sorted the files. There are no specific key for sorting so i plan to arrange the files based on the file size. The command that i used to sort the files by size is as per below:- ls -l | sort +4rn | awk '{print $5, $9}' The problem that i... (3 Replies)
Discussion started by: shahril
3 Replies

7. Solaris

Command to List Hard Disk Information

I have a SparcStation5 that is making sounds that make me think the disk drive(s) may be on the verge of quiting. What is the command to list the disk types and sizes? I'm thinking I can possibly pick up another drive or two and compy the exisiting drives while they are still working. (1 Reply)
Discussion started by: muletrainman
1 Replies

8. UNIX for Dummies Questions & Answers

How to list a file size, but not its name?

If I have a file x.txt that is 8 bytes... I want to enter >> x.txt 8 I've played around with ls, and du... and they always list the file name. (2 Replies)
Discussion started by: ordano
2 Replies

9. HP-UX

command to list file size

I'm new to HP-UX and am looking for the command that will allow to me determine the total size of listed files. I'm being told that my backup selection is exceeding my tape drive size and need to determine how much information is being backed up. Help? (3 Replies)
Discussion started by: rgordon
3 Replies

10. UNIX for Dummies Questions & Answers

List File size

Hello all, I have a directory filling up. I need to determine the size of the files in the directory. How do I do that, what command should I run when I am in the directory? Next question, can I expand the partition size? (10 Replies)
Discussion started by: komputersman
10 Replies
Login or Register to Ask a Question