Sponsored Content
Top Forums Shell Programming and Scripting Just listing size, timestamp & name of files in a directory Post 302389662 by Jazmania on Monday 25th of January 2010 12:46:19 PM
Old 01-25-2010
[Answered] Just listing size, timestamp & name of files in a directory

I have a txt file with the contents of the folder in it.. I used ls -lrt > rcode_folder.txt so the file looks like this..

-rw-r----- 1 jazmania dba 787510 Jul 26 2004 code.r

I just want the 787510 Jul 26 2004 code.r part to show in the file



I then tried to use the below cut command but i'm not sure if i'm using the -f part right...

Code:
cut -f 5-9 -d ' ' ./rcode_folder.txt > formated_rcode.txt


Last edited by Jazmania; 01-25-2010 at 02:22 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. Filesystems, Disks and Memory

Sun UNIX Files & Folders listing

Hi guys, i'm new to UNIX and only know a small amout about it, but have just had some changes at work which now require me to interact with and work on SUN Unix systems often. I have reasonable knowledge of PC's but hope that you will be able to help me with these questions. Part1. I would like... (3 Replies)
Discussion started by: Scrat
3 Replies

3. UNIX for Dummies Questions & Answers

Timestamp in directory listing

Hi, I need a help. I want to see all the files in the directory with the Time Stamp. I use the following command. $ls -lt This displays the files with time stamp, but not all the files. Only last few months, the files are displayed with timestamp, the old files are only have dates. ... (2 Replies)
Discussion started by: vijashok
2 Replies

4. UNIX for Dummies Questions & Answers

listing files in a directory in bases of size

Hi , I want to list all files in the order of size . Just want to know which files occupies more size and which occupies less size . Is it possible with ls command ? :) Thanks, Arun. (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

5. UNIX for Advanced & Expert Users

Block size in listing files

I see the following in my prompt... that is, i have only one file but i see 8 as total. /home/asla>ls -l total 8 -rw-r--r-- 1 oracle dba 6 Oct 17 18:59 simple Can you please tell me why that 8? I checked different sources they say it is number of blocks but in this case... (7 Replies)
Discussion started by: shahnazurs
7 Replies

6. Shell Programming and Scripting

How to delete some of the files in the directory, if the directory size limits the specified size

To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies

7. Shell Programming and Scripting

Listing latest & large files from a mounted drive

Hi All, My AIX server have a mounted drive "/stage". I want to list the latest modified/created files in this drive. Also large files in this drive. I tried to ls -l | sort +4nr | head -10 Someother solutions to list from entire drive. Thanks. :) (6 Replies)
Discussion started by: karumudi7
6 Replies

8. Homework & Coursework Questions

Listing the files in a directory

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A script that takes any number of directories as command line arguments and then lists the contents of each of... (3 Replies)
Discussion started by: Phaneendra G
3 Replies

9. Shell Programming and Scripting

Listing of files between two timestamp

Hi, I want to list down the files between two timestamp. But I can not use newer or newermt command as it doesn't support these tokens. Is there any other way to achieve this? Else I have to write too much of coding . Input Dec 01 02:02 Dec 02 05:07 (8 Replies)
Discussion started by: Abhijit Sen
8 Replies

10. Shell Programming and Scripting

Directory listing in the order of size

I want to display directory listing in the order of size. I do not have -S option in my version of UNIX. So I wrote a simple script. But it takes "| sort -n -k5,5" part as file names. Any suggestion? #!/bin/ksh cmd='ls -l *.TXT | sort -n -k 5,5' set -x $cmd return 0 (7 Replies)
Discussion started by: Soham
7 Replies
show directory(1m)														show directory(1m)

NAME
show directory - Displays attribute information about the specified directory SYNOPSIS
cdscp show directory directory-name [attribute-name] [with attribute-name = attribute-value] ARGUMENTS
The full name of a specific directory. The last simple name can contain wildcard characters. The name of a particular attribute; see Description for valid attribute names. The value of a particular attribute. DESCRIPTION
The show directory command displays the names and values of the attributes specified in attribute-name. You can use a combination of attributes in any sequence in a single command. Use a space to separate multiple attributes. You can use a with attribute-name = attribute-value clause to limit output only to directories whose attributes have values equal to the specified values. A space must pre- cede and follow the = (equals sign). If you do not supply any attributes, the command displays all attributes and their values. In addi- tion to the following directory attributes, application-specific attributes can exist for a directory: Indicates the date and time of the last successful skulk on the directory. All replicas of the directory are guaranteed to receive all updates whose timestamps are less than the value of this attribute. Specifies the degree of consistency among replicas. This attribute's value is defined as one of the follow- ing: CDS does not immediately propagate an update. The next skulk distributes all updates that occurred since the previous skulk. Skulks occur at least once every 24 hours. CDS attempts to immediately propagate an update to all replicas. If the attempt fails, the next sched- uled skulk makes the replicas consistent. Skulks occur at least once every 12 hours. CDS attempts to immediately propagate an update to all replicas. If the attempt fails (for example, if one of the replicas is unavailable), a skulk is scheduled for within one hour. Skulks usually occur at least once every 12 hours. Use this setting temporarily and briefly, because it uses extensive system resources. By default, every directory inherits the convergence setting of its parent at creation time. The default setting on the root directory is medium. Specifies the creation timestamp (CTS) of the CDS directory. Specifies the minimum of all the values of the CDS_ReplicaVersion attribute on the directory replicas. A UUID that identifies a particular incarnation of the directory. Records the timestamp of the last skulk performed on this directory. Records the timestamp of the most recent change to any attribute of a directory replica, or any change to an entry in the replica. Specifies the unique identifier of the directory. Contains a pointer to this directory's parent in the names- pace. Specifies the address, UUID, and name of every clearinghouse where a copy of this directory is located. This attribute also speci- fies whether the replica in a particular clearinghouse is a master or read-only replica. Specifies whether a directory replica can be accessed. Indicates whether a directory replica is a master or read-only replica. Specifies the version of a replica of the directory. Specifies the UUID of a clearinghouse containing another replica of this directory. This attribute is written by the system and is read- only to users. It will appear on older directories, but not on DCE 1.1 directories. Controls the upgrading of a directory from one ver- sion of CDS to another. By modifying this attribute, you can initiate the upgrading of a directory to a new version of CDS. Specifies the timestamp of the most recent update to an attribute of the directory. Specifies the RPC runtime software version that can be used to import on the directory. Privilege Required You must have read permission to the directory. If you specify a wildcard directory name, you also need read permission to the directory's parent directory. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command displays the current values of all the attributes associated with the /.:/admin directory: cdscp> show directory /.:/admin SHOW DIRECTORY /.../abc.com/admin AT 1991-10-15-15:43:59 RPC_ClassVersion = 0100 CDS_CTS = 1991-10-15-13:09:47.000000003/08-00-2b-1c-8f-1f CDS_UTS = 1991-10-17-08:59:50.000000006/08-00-2b-1c-8f-1f CDS_ObjectUUID = ba700c98-8b1a-11ca-8981-08002b0f79aa CDS_Replicas = : Clearinghouse's UUID = 2ab024a8-8b1a-11ca-8981-08002b0f79aa Tower = ncadg_ip_udp:16.20.16.32 Tower = ncacn_ip_tcp:16.20.16.32 Replica type = master Clearinghouse's Name = /.../abc.com/Paris_CH CDS_AllUpTo = 1991-10-17-08:51:18.000000032/08-00-2b-1c-8f-1f CDS_Convergence = medium CDS_ParentPointer = : Parent's UUID = b773525c-8b1a-11ca-8981-08002b0f79aa Timeout = : Expiration = 1991-10-16-19:43:50.516 Extension = +1-00:00:00.000 CDS_DirectoryVersion = 3.0 CDS_ReplicaState = on CDS_ReplicaType = master CDS_LastSkulk = 1991-10-17-08:51:18.000000032/08-00-2b-1c-8f-1f CDS_LastUpdate = 1991-10-21-13:04:02.000000044/08-00-2b-1c-8f-1f CDS_RingPointer = 2ab024a8-8b1a-11ca-8981-08002b0f79aa CDS_Epoch = bd8b2c50-8b1a-11ca-8981-08002b0f79aa CDS_ReplicaVersion = 3.0 RELATED INFORMATION
Commands: add directory(1m), create directory(1m), delete directory(1m), list directory(1m), remove directory(1m), set directory(1m) show directory(1m)
All times are GMT -4. The time now is 10:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy