Sponsored Content
Operating Systems Solaris using ls -ltr : display only last four file names Post 302401431 by murugaperumal on Saturday 6th of March 2010 04:57:35 AM
Old 03-06-2010
Code:
ls -lrt | tac | head -4 | tac

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Display file names that are being deleted

The print command lists the path of the file being found. I want the output as the file name along with the date that particular files were created i.e similar to a ls -l command. I am using find to list all the files that satisfy the selection criteria and delete them using rm. Can I display... (2 Replies)
Discussion started by: theguy16
2 Replies

2. UNIX for Dummies Questions & Answers

Extracting only file size of the ls -ltr command.

All, I only need to get the file size when I do an ls -ltr filename.txt Could you give me the exact syntax. Thanks KOP (6 Replies)
Discussion started by: kingofprussia
6 Replies

3. UNIX and Linux Applications

display only file names

Hi, I want to display only the file names of the ls command with a delimiter of comma. For example:- ls /etc/dir/N* gives the following output /etc/dir/N1 /etc/dir/N2 /etc/dir/N3 I want the output as N1,N2,N3,-->Here i need the final comma also. Also, here /etc/dir is being... (4 Replies)
Discussion started by: dnat
4 Replies

4. Shell Programming and Scripting

Shell Script to display function names (called & defined) in a C++ Source Code

Hello to all, I am looking for a way to display only the names of function (calls & definition) of a C++ source code.There is already a post related to this, but the script is to find the functions using a specific variable, and the replies are not that convincing since they cannot be used for... (2 Replies)
Discussion started by: frozensmilz
2 Replies

5. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

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

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

8. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 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
sctelemetry(1M) 					  System Administration Commands					   sctelemetry(1M)

NAME
sctelemetry - initialize system resource monitoring SYNOPSIS
sctelemetry -d sctelemetry -e sctelemetry -i -o hasp_rg=rg,hasp_rs=rs [,hasp_mnt_pt=mnt_pt] [,db_rg=rg] [,db_rs=rs] [,telemetry_rg=rg] [,telemetry_rs=rs] sctelemetry -i -o hasp_mnt_pt=mnt_pt,hasp_nodelist=node[:...] [,hasp_rs=rs] [,db_rg=rg] [,db_rs=rs] [,telemetry_rg=rg,telemetry_rs=rs] sctelemetry -u DESCRIPTION
Note - Beginning with the Sun Cluster 3.2 release, Sun Cluster software includes an object-oriented command set. Although Sun Cluster software still supports the original command set, Sun Cluster procedural documentation uses only the object-oriented command set. For more infor- mation about the object-oriented command set, see the Intro(1CL) man page. The sctelemetry command initializes system resource monitoring, brings monitoring online, and takes it offline. When initializing, use the -o option with the hasp_rg=rg,hasp_rs=rs parameters to rely on an existing resource of type SUNW.HAStoragePlus. Use the -o option with the hasp_mnt_pt=mnt_pt,hasp_nodelist=node[:,...]parameters to have the sctelemetry command create a resource of type SUNW.HAStoragePlus. For more information about the resource types, see the SUNW.derby(5), SUNW.HAStoragePlus(5), and SUNW.SCTelemetry(5) man pages. SUNW.SCTelemetry is instantiated in a multi-master resource group, that is the resource group is configured on all cluster nodes and does not use network load balancing. You can use this command only in the global zone. OPTIONS
The options for sctelemetry are as follows: -d Disables the collection of system resource usage data and the database in which telemetry data is stored. You can use this option only in the global zone. Users other than superuser require solaris.cluster.system.modify RBAC authorization to use the -d option of sctelemetry. For more information, see the rbac(5) man page. -e Brings collection of system resource usage data online. By default, system resource monitoring is online when you use the -i option of the sctelemetry command. You can use this option only in the global zone. Users other than superuser require solaris.cluster.system.modify RBAC authorization to use the -e option of sctelemetry. For more information, see the rbac(5) man page. -i Creates resource groups containing resources of type SUNW.SCTelemetry and SUNW.derby. By default, when you create these resources and resource groups by using the -i option, system resource monitoring is online. You can use this option only in the global zone. Users other than superuser require solaris.cluster.system.modify RBAC authorization to use the -i option of sctelemetry. For more information, see the rbac(5) man page. -o hasp_rg=rg,hasp_rs=rs[,hasp_mnt_pt=mnt_pt][,db_rg=rg][,db_rs=rs][,telemetry_rg=rg][ ,telemetry_rs=rs] When used with the -i option, identifies the resource of type SUNW.HAStoragePlus to be used by the database and the resource group that contains this resource. The data collection facility must have access to a file system for SUNW.HAStoragePlus. The parameters are as follows: hasp_rg=rg The resource group that contains the resource of type SUNW.HAStoragePlus that is used for system resource monitoring. You must specify rg, the name of this resource group. hasp_rs=rs The resource of type SUNW.HAStoragePlus that is used for system resource monitoring. You must specify rs, the name of this resource. hasp_mnt_pt=mnt_pt The mount point on which sctelemetry stores database files for system resource monitoring. This mount point must be a property of the resource, hasp_rs. Specifying this mount point is obligatory if there is more than one mount point in hasp_rs. db_rg=rg The resource group in which sctelemetry configures the resource of type SUNW.derby. You can specify rg, the name of this resource group. db_rs=rs The resource of type SUNW.derby that sctelemetry configures. You can specify rs, the name of this resource. telemetry_rg=rg The resource group in which sctelemetry configures a resource of type SUNW.SCTelemetry. You can specify rg, the name of this resource group. telemetry_rs=rs The resource of type SUNW.SCTelemetry that sctelemetry configures. You can specify rs, the name of this resource. -o hasp_mnt_pt=mnt_pt,hasp_nodelist=node[:...][,hasp_rs=rs][,db_rg=rg][,db_rs=rs][,telemetry_rs=rs] When used with the -i option, specifies the nodes on which the SUNW.HAStoragePlus file system for data collection is accessible and specifies the mount point for the file system in which Sun Cluster stores system resource data. The parameters are as follows: hasp_mnt_pt=mnt_pt The mount point that sctelemetry uses to configure a resource of type SUNW.HAStoragePlus. You must specify mnt_pt, the name of the mount point. The shared storage must be configured before the HAStoragePlus resource to be created. This mount point refers to the shared storage and must appear in /etc/vfstab as follows: /dev/md/ddg/dsk/d20 /dev/md/ddg/rdsk/d20 /mntpt ufs 2 no logging hasp_nodelist=node[:...] The nodes with which sctelemetry configures a resource of type SUNW.HAStoragePlus. You must specify node:[...], the name of the nodes. hasp_rs=rs The resource of type SUNW.HAStoragePlus that sctelemetry configures. You can specify rs, the name of this resource. db_rg=rg The resource group in which sctelemetry configures a resource of type SUNW.derby. You can specify rg, the name of this resource group. db_rs=rs The resource of type SUNW.derby that sctelemetry configures. You can specify rs, the name of this resource. telemetry_rg=rg The resource group in which sctelemetry configures a resource of type SUNW.SCTelemetry. You can specify rg, the name of this resource group. telemetry_rs=rs The resource of type SUNW.SCTelemetry that sctelemetry configures. You can specify rs, the name of this resource. -u Removes the resources and resource groups that were previously created by using the -i option. You can use this option only in the global zone. Users other than superuser require solaris.cluster.system.modify RBAC authorization to use the -u option of the sctelemetry command. For more information, see the rbac(5) man page. EXAMPLES
Initializing System-Resource Monitoring, When a HAStoragePlus Resource Exists This example initializes system-resource monitoring and verifies that monitoring has been initialized. This example assumes that you have a SUNW.HAStoragePlus resource available for system-resource monitoring. This example does not specify the names of the resources db_rs and telemetry_rs or the resource groups db_rg and telemetry_rg. The sctelemetry command gives these resources and resource groups default names. The output of the scstat -g command shows the relationship between resources and resource groups involved in system resource monitoring. The output also shows that the db_rs and hasp_rs resources and the db_rg resource group are each online on one node, the telemetry_rg and telemetry_rs are online on all cluster nodes. # sctelemetry -i -o hasp_mnt_pt=DBDATA,hasp_nodelist=l6-lx-1:l6-lx-4,hasp_rs=anto # scstat -g Disabling System-Resource Monitoring This example disables system-resource monitoring then verifies that the monitoring has been disabled. When monitoring is disabled, the out- put of the scstat -g command shows that the db_rs, hasp_rs, and telemetry_rs resources and the db_rg and telemetry_rg resource groups are offline. # sctelemetry -d # scstat -g EXIT STATUS
The following exit values are returned: 0 The command completed successfully. nonzero An error has occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsczu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
Intro(1CL), cltelemetryattribute(1CL), cluster(1CL), scstat(1M), sctelemetry(1M), SUNW.derby(5), SUNW.HAStoragePlus(5), SUNW.SCTelemetry(5) Sun Cluster 3.2 18 Jul 2006 sctelemetry(1M)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy