Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extracting only file size of the ls -ltr command. Post 302117079 by Shell_Life on Thursday 10th of May 2007 11:39:08 AM
Old 05-10-2007
Try this:
Note that <tab> is the one character tab (control-i, hex 09, octal 011).
Code:
du -a | sed 's/<tab>.*//' | sort -n

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what does the ls -ltr command list

Hi, THe following is the output when i run the command ls -ltr can anyone explain the meaning of the field in red -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027SASI.gnt -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027RITD.gnt -rw-r----- 3 orca orca ... (2 Replies)
Discussion started by: ranjita.c
2 Replies

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

3. Programming

Help in extracting data with command from file in C

Hi, I have a file which stores the following array :- 1,2,3,4,5.........16,17,18,19,20 This file has few hundreds of inputs of these lines. I would like to read this file one line at a time; and assign to an array which is separated by ",". I tried to do fgets command however,... (10 Replies)
Discussion started by: ahjiefreak
10 Replies

4. Shell Programming and Scripting

ls -ltr command On Remote server

I am writing a script where in i have to log into a remote machine and check for necessary file by typing (ls -ltr *200505) (this gets all 05month of 2008 yr files) and if files are found get them to the local machine. If not found print a message saying no files on local machine. When i was... (2 Replies)
Discussion started by: vasuarjula
2 Replies

5. Shell Programming and Scripting

Printing Year in ls -ltr command

Hi, When retrieving parameters of a file using ls command i need to print the year part . When i do ls -ltr the following output is displayed -rwxrwxrwx 1 d_infd d_infd 1711 Jan 8 2004 wf1.class. Here the year part is not displayed only Jan 8 is displayed. Can any one... (9 Replies)
Discussion started by: ragugct
9 Replies

6. Solaris

using ls -ltr : display only last four file names

Hi , Server details – Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Fire-880 When I put ls –ltr command I get – /users/testuser> ls -ltr -rw-rw-r-- 1 testuser dba 76 Jan 13 2009 ftp.scr -rwxr-xr-x 1... (6 Replies)
Discussion started by: rahulbahulekar
6 Replies

7. UNIX for Dummies Questions & Answers

ls -ltr for a future date/time stamp file

Hi When i do ls -ltr <file1> then it shows me the date and time of the file if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time. suppose a file was copied from INDIA... (3 Replies)
Discussion started by: reldb
3 Replies

8. UNIX for Advanced & Expert Users

ls -ltr a list of filenames-with-spaces within a text file

OS: RHEL 5.8 shell: bash 3.2.25 Directory /home/guest/ contains these files: file a file b file c fileD fileE fileF testFile.txt I'm trying to find the syntax to run ls -ltr against this list of files that is contained within a text file, testFile.txt. The file testFile.txt has... (4 Replies)
Discussion started by: uschaafm
4 Replies

9. Shell Programming and Scripting

I have two commands “ls -h” and “ls -ltr”. How do i make sure “ls -ltr” is run after “ls -h” is suc

help me (2 Replies)
Discussion started by: sonu pandey
2 Replies

10. UNIX for Beginners Questions & Answers

Generic script to load file details(ls -ltr) in to a database.

All, I am trying to create a report on the duration of an ETL load from the file arrival to the final dump in to a database for SLA's. Does anyone have any guidance or ideas on how metadata can be extracted; information of a file: like file name, created timestamp, count of records and load... (1 Reply)
Discussion started by: pradeepp
1 Replies
ASCII(1)                                                         Development Tools                                                        ASCII(1)

NAME
ascii - report character aliases SYNOPSIS
ascii [-dxohv] [-t] [char-alias...] OPTIONS
Called with no options, ascii behaves like `ascii -h'. Options are as follows: -t Script-friendly mode, emits only ISO/decimal/hex/octal/binary encodings of the character. -s Parse multiple characters. Convenient way of parsing strings. -d Ascii table in decimal. -x Ascii table in hex. -o Ascii table in octal. -h, -? Show summary of options and a simple ASCII table. -v Show version of program. DESCRIPTION
Characters in the ASCII set can have many aliases, depending on context. A character's possible names include: * Its bit pattern (binary representation). * Its hex, decimal and octal representations. * Its teletype mnemonic and caret-notation form (for control chars). * Its backlash-escape form in C (for some control chars). * Its printed form (for printables). * Its full ISO official name in English. * Its ISO/ECMA code table reference. * Its name as an HTML/SGML entity. * Slang and other names in wide use for it among hackers. This utility accepts command-line strings and tries to interpret them as one of the above. When it finds a value, it prints all of the names of the character. The constructs in the following list can be used to specify character values. If an argument could be interpreted in two or more ways, names for all the different characters it might be are dumped. character Any character not described by one of the following conventions represents the character itself. ^character A caret followed by a character. character A backslash followed by certain special characters (abfnrtv). mnemonic An ASCII teletype mnemonic. hexadecimal A hexadecimal (hex) sequence consists of one or two case-insensitive hex digit characters (01234567890abcdef). To ensure hex interpretation use hexh, 0xhex, xhex or xhex. decimal A decimal sequence consists of one, two or three decimal digit characters (0123456789). To ensure decimal interpretation use ddecimal, ddecimal, or ddecimal. octal An octal sequence consists of one, two or three octal digit characters (01234567). To ensure octal interpretation use octal, 0ooctal, ooctal, or ooctal. bit pattern A bit pattern (binary) sequence consists of one to eight binary digit characters (01). To ensure bit interpretation use 0bbit pattern, bbit pattern or bit pattern. ISO/ECMA code A ISO/ECMA code sequence consists of one or two decimal digit characters, a slash, and one or two decimal digit characters. name An official ASCII or slang name. The slang names recognized and printed out are from a rather comprehensive list that first appeared on USENET in early 1990 and has been continuously updated since. Mnemonics recognized and printed include the official ASCII set, some official ISO names (where those differ) and a few common-use alternatives (such as NL for LF). HTML/SGML entity names are also printed when applicable. All comparisons are case-insensitive, and dashes are mapped to spaces. Any unrecognized arguments or out of range values are silently ignored. Note that the -s option will not recognize 'long' names, as it cannot differentiate them from other parts of the string. For correct results, be careful to stringize or quote shell metacharacters in arguments (especially backslash). This utility is particularly handy for interpreting cc(1)'s ugly octal `invalid-character' messages, or when coding anything to do with serial communications. As a side effect it serves as a handy base-converter for random 8-bit values. AUTHOR
Eric S. Raymond esr@snark.thyrsus.com; November 1990 (home page at http://www.catb.org/~esr/). Reproduce, use, and modify as you like as long as you don't remove this authorship notice. Ioannis E. Tambouras <ioannis@debian.org> added command options and minor enhancements. Brian J. Ginsbach <ginsbach@sgi.com> fixed several bugs and expanded the man page. David N. Welton <davidw@efn.org> added the -s option. Matej Vela corrected the ISO names. Dave Capella contributed the idea of listing HTML/SGML entities. ascii 03/26/2011 ASCII(1)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy