Sponsored Content
Full Discussion: command to list file size
Operating Systems HP-UX command to list file size Post 95035 by RTM on Thursday 5th of January 2006 08:25:47 PM
Old 01-05-2006
Try either ls or du command from the directory you are starting on
ls -lR will list all files and du -s will list total usage. Look at the man pages for those commands for more options and the man page for the df command for complete filesystems.

Example:

[localhost ~]$ pwd
/home/hunter
[localhost ~]$ du -s .
49864 .
[localhost ~]$ ls -l
total 252
-rw-rw-r-- 1 hunt staff 33 Nov 25 07:09 asfile
-rwxr--r-- 1 hunt staff 179 Sep 21 10:53 control
-rwxr--r-- 1 hunt staff 210 Sep 27 18:02 cutjunk
drwxr-xr-x 4 hunt staff 4096 Dec 2 21:23 Desktop
-rwxr--r-- 1 hunt staff 1197 Jul 19 12:26 ds
-rw-rw-r-- 1 hunt staff 33 Nov 25 07:08 ebfile
-rw-rw-r-- 1 hunt staff 0 Dec 19 13:40 fall
-rw-rw-r-- 1 hunt staff 0 Dec 19 13:40 f-all
-rw-rw-r-- 1 hunt staff 57 Nov 18 08:24 file
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command to list Files less than or equal to 2k size

Hi, *.xml files stored on date wise folders. I need to extract *.xml files from all the folders. File size is lessthan or equal to 2K. Please let me know command or some shell program to due this job on linux m/c This is urgent, Thanks in advance - Bache Gowda (3 Replies)
Discussion started by: bache_gowda
3 Replies

2. 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

3. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

4. UNIX for Dummies Questions & Answers

Total file size of a subset list

Hello! I'm trying to find out the total file size of a subset list in a directory. For example, I do not need to know the total file size of all the files in a directory, but I need to know what the total size is of say, "ls -l *FEB08*" in a directory. Is there any easy way of doing this? ... (3 Replies)
Discussion started by: tekster757
3 Replies

5. 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

6. UNIX for Dummies Questions & Answers

Sort by size, then list file in each directory

Hi, I have directories with name like: aaa bbb ccc ... I would like to to see which directories are the largest and then list the files within each. I have success using: du -ks * | sort -rin | head -n 20 which gives me an output like: 120 bbb 27 ccc 3 aaa ... I would like... (3 Replies)
Discussion started by: ChatPerdu
3 Replies

7. UNIX for Dummies Questions & Answers

Command to list our directory size

Is there any command that can list out all the files size including directory in 1 command? `ls` will only give 2048 for a directory, which i'm looking for the actual size. (5 Replies)
Discussion started by: lsy
5 Replies

8. Shell Programming and Scripting

Need to get the list of file with size in AUX

to get the list of file name with size Example: rwxrwxrwx 1 cm x 562KB Nov 6 19:22 a rwxrwxrwx 1 cm x 562MB Nov 6 19:22 a edit by bakunin: Please view this code tag video for how to use code tags when posting code and data. (5 Replies)
Discussion started by: Jewel
5 Replies

9. 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

10. HP-UX

How to list file size on HPUX?

I used to use ls -l cut to detrmine file size, and google searches didn't come up with anything else but 'stat' which doesn't appear on HPUX. I discovered the humble 'wc -c' which does this job very neatly, and thought I would share it. (7 Replies)
Discussion started by: tbochan
7 Replies
HUNT(6) 							   Games Manual 							   HUNT(6)

NAME
hunt - a multi-player multi-terminal game SYNOPSIS
/usr/games/hunt [-q] [-m] [hostname] [-l name] DESCRIPTION
The object of the game hunt is to kill off the other players. There are no rooms, no treasures, and no monsters. Instead, you wander around a maze, find grenades, trip mines, and shoot down walls and players. The more players you kill before you die, the better your score is. If the -m flag is given, you enter the game as a monitor (you can see the action but you cannot play). Hunt normally looks for an active game on the local network; if none is found, it starts one up on the local host. One may specify the location of the game by giving the hostname argument. The player name may be specified on the command line by using the -l option. This command syntax was chosen for rlogin/rsh compatibility. If the -q flag is given, hunt queries the network and reports if an active game were found. This is useful for .login scripts. Hunt only works on crt (vdt) terminals with at least 24 lines, 80 columns, and cursor addressing. The screen is divided in to 3 areas. On the right hand side is the status area. It shows you how much damage you've sustained, how many charges you have left, who's in the game, who's scanning (the asterisk in front of the name), who's cloaked (the plus sign in front of the name), and other players' scores. Most of the rest of the screen is taken up by your map of the maze, except for the 24th line, which is used for longer messages that don't fit in the status area. Hunt uses the same keys to move as vi does, i.e., h,j,k, and l for left, down, up, right respectively. To change which direction you're facing in the maze, use the upper case version of the movement key (i.e., HJKL). Other commands are: f - Fire (in the direction you're facing) (Takes 1 charge) g - Throw grenade (in the direction you're facing) (Takes 9 charges) F - Throw satchel charge (Takes 25 charges) G - Throw bomb (Takes 49 charges) o - Throw small slime bomb (Takes 15 charges) O - Throw big slime bomb (Takes 30 charges) s - Scan (show where other players are) (Takes 1 charge) c - Cloak (hide from scanners) (Takes 1 charge) ^L - Redraw screen q - Quit Knowing what the symbols on the screen often helps: -|+ - walls / - diagonal (deflecting) walls # - doors (dispersion walls) ; - small mine g - large mine : - shot o - grenade O - satchel charge @ - bomb s - small slime bomb $ - big slime bomb ><^v - you facing right, left, up, or down }{i! - other players facing right, left, up, or down * - explosion |/ -*- - grenade and large mine explosion /| Satchel and bomb explosions are larger than grenades (5x5, 7x7, and 3x3 respectively). Other helpful hints: [] You can only fire in the direction you are facing. [] You can only fire three shots in a row, then the gun must cool. [] A shot only affects the square it hits. [] Shots and grenades move 5 times faster than you do. [] To stab someone, you must face that player and move at them. [] Stabbing does 2 points worth of damage and shooting does 5 points. [] Slime does 5 points of damage each time it hits. [] You start with 15 charges and get 5 more for every new player. [] A grenade affects the nine squares centered about the square it hits. [] A satchel affects the twenty-five squares centered about the square it hits. [] A bomb affects the forty-nine squares centered about the square it hits. [] Slime affects all squares it oozes over (15 or 30 respectively). [] One small mine and one large mine is placed in the maze for every new player. A mine has a 5% probability of tripping when you walk directly at it; 50% when going sideways on to it; 95% when backing up on to it. Tripping a mine costs you 5 points or 10 points respec- tively. Defusing a mine is worth 1 charge or 9 charges respectively. [] You cannot see behind you. [] Scanning lasts for (20 times the number of players) turns. Scanning takes 1 ammo charge, so don't waste all your charges scanning. [] Cloaking lasts for 20 turns. [] Whenever you kill someone, you get 2 more damage capacity points and 2 damage points taken away. [] Maximum typeahead is 5 characters. [] A shot destroys normal (i.e., non-diagonal, non-door) walls. [] Diagonal walls deflect shots and change orientation. [] Doors disperse shots in random directions (up, down, left, right). [] Diagonal walls and doors cannot be destroyed by direct shots but may be destroyed by an adjacent grenade explosion. [] Slime goes around walls, not through them. [] Walls regenerate, reappearing in the order they were destroyed. One percent of the regenerated walls will be diagonal walls or doors. When a wall is generated directly beneath a player, he is thrown in a random direction for a random period of time. When he lands, he sustains damage (up to 20 percent of the amount of damage he had before impact); that is, the less damage he had, the more nimble he is and therefore less likely to hurt himself on landing. [] The environment variable HUNT is checked to get the player name. If you don't have this variable set, hunt will ask you what name you want to play under. If it is set, you may also set up a single character keyboard map, but then you have to enumerate the options: e.g. setenv HUNT ``name=Sneaky,mapkey=zoFfGg1f2g3F4G'' sets the player name to Sneaky, and the maps z to o, F to f, G to g, 1 to f, 2 to g, 3 to F, and 4 to G. The mapkey option must be last. [] It's a boring game if you're the only one playing. Your score is the ratio of number of kills to number of times you entered the game and is only kept for the duration of a single session of hunt. Hunt normally drives up the load average to be about (number_of_players + 0.5) greater than it would be without a hunt game executing. A limit of three players per host and nine players total is enforced by hunt. FILES
/usr/games/lib/hunt.driver game coordinator AUTHORS
Conrad Huang, Ken Arnold, and Greg Couch; University of California, San Francisco, Computer Graphics Lab ACKNOWLEDGEMENTS
We thank Don Kneller, John Thomason, Eric Pettersen, and Scott Weiner for providing endless hours of play-testing to improve the character of the game. We hope their significant others will forgive them; we certainly don't. BUGS
To keep up the pace, not everything is as realistic as possible. There were some bugs in early releases of 4.2 BSD that hunt helped discover; hunt will crash your system if those bugs haven't been fixed. 4.3 Berkeley Distribution January 9, 1986 HUNT(6)
All times are GMT -4. The time now is 08:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy