Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to copy set of files with date appended to their name Post 302212462 by sish78 on Monday 7th of July 2008 04:15:39 PM
Old 07-07-2008
thanks for the prompt response, is there nay other way of doing it

--like using in a single unix command line.
 

10 More Discussions You Might Find Interesting

1. HP-UX

copy files with date

Hi, I have a coupel of files in /tmp which I have to copy to /var. But I want their name to be same as the source with date suffix. But the problem is I don;t know the prefix of the file, I only know the suffix of file. AAA.997 ABC.997 ADC.997 The later part 997 is constant but the... (1 Reply)
Discussion started by: isingh786
1 Replies

2. UNIX for Advanced & Expert Users

How can i copy files by date last modifed range?

When I do a ls -lt I get a list of files by date modified from newest to oldest. I would like to be able to copy some files to another directory using a date last modified range (i.e. Apr 30 - May 13) How could I do this? Thanks, Joe (4 Replies)
Discussion started by: geauxsaints
4 Replies

3. Shell Programming and Scripting

How to sort a set of files by date in a directory?

hi there, I have a directory which contents I can parse dynamically. I end up with a file list. I then want to display those files sorted by date, oldest files first. I have very very little PERL experience...Would anyone know how to do that ? Thanks in advance. (8 Replies)
Discussion started by: alexf
8 Replies

4. Shell Programming and Scripting

Copy files based on date

Hi all i am having so many files in my directory.Is there any option to copy files based on date. example i am having file this -rw-rw-r-- 1 ram user 1 Feb 2 17:12 abc -rw-rw-r-- 1 ram user 1 Feb 2 17:12 bnw -rwxrwxr-x 1 ram user 21122 Feb 4... (3 Replies)
Discussion started by: suryanarayana
3 Replies

5. UNIX for Dummies Questions & Answers

shell scripts - create a filename with the date appended

I am looking to do something where if I created a file named backup,or whatever it would print a name like “backup_Apr_11_2011”. Thanks citizencro (1 Reply)
Discussion started by: citizencro
1 Replies

6. Shell Programming and Scripting

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
Discussion started by: johannd
1 Replies

7. UNIX for Dummies Questions & Answers

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Discussion started by: johannd
7 Replies

8. UNIX for Dummies Questions & Answers

Script to copy files from a certain date

I need to copy files from a directory that has a lot of files in it. However I only want to copy them from a certain date. My thoughts so far are to use ls -l and to pipe this into awk and print out tokens 6 (month)and 7 (day). $ ls -l -rw-r--r-- 1 prodqual tst 681883 Jun 12... (2 Replies)
Discussion started by: millsy5
2 Replies

9. Shell Programming and Scripting

how to copy current date files to another dir

i have directory /abcd and i want to copy all today date files in /xyz directory. i am able to see the files by using below command but not able to understand copy. find . -mtime -1 -type f -exec ls -l {} \; (2 Replies)
Discussion started by: learnbash
2 Replies

10. Shell Programming and Scripting

How to copy or cut specific rows from appended file with some conditions

Hi I have one file which is containing about 5000 rows and 20 columns I will just explain about my requirement here briefly with sample file, I have attached also, please help....me.. 1 28.25 36.42 5 28.26 36.42 10 28.23 36.43 15 28.22 36.43 20 28.2 36.42 25... (6 Replies)
Discussion started by: nex_asp
6 Replies
XtGetValues()															     XtGetValues()

Name
  XtGetValues - query widget resource values.

Synopsis
  void XtGetValues(object, args, num_args)
	 Widget object;
	 ArgList args;
	 Cardinal num_args;

Inputs
  object    Specifies the object whose resource values are to be returned; may be of class Object or any subclass thereof.

  args	    Specifies  the argument list of name/address pairs that contain the resource names and the addresses into which the resource val-
	    ues are to be stored.

  num_args  Specifies the number of arguments in the argument list.

Description
  XtGetValues() retrieves the current values of one or more resources associated with a widget instance.  Each element	in  args  is  an  Arg
  structure  which  contains  the resource name in the name field, and a pointer to the location at which the resource is to be stored in the
  value field.	It is the caller's responsibility to ensure that the value field points to a value of the correct type.  If the  value	field
  points to allocated memory, the caller is also responsible for freeing that memory.

  If  args  contains  a  resource name that is not found in any of the resource lists searched, the value at the corresponding address is not
  modified.

  Many widget resource values are simply copied from the widget to the specified address.  When the resource is a pointer  type  (such	as  a
  string or pointer to a structure) some widgets will make a copy of the pointed to value and store the address of this copy at the specified
  address.  If a copy is made, the caller is responsible for freeing the value when done with it.  If no copy  is  made,  then	the  returned
  value  points  to memory owned by the widget, and the caller must not modify or free this value in any way.  None of the Intrinsics defined
  classes copy values in this way, nor do widgets in the Athena Widget set.  See the documentation for the particular resource of the partic-
  ular widget you are using to determine if a copy is made.

  If  a  resource  value which is a pointer type is returned without being copied, then the returned value may not remain valid indefinitely.
  The Intrinsics specify lifetimes for the following resources: The XtNchildren resource of Composite widgets and any callback list  resource
  are only valid until some operation (such as XtCreateWidget() or XtAddCallback()) modifies the resource.  The XtNtranslations and XtNaccel-
  erators Core resources remain valid at least until the widget is destroyed.  The XtNscreen Core resource remains valid until the Display is
  closed.  See the documentation for the particular resource of the particular widget you are using to determine its lifetime.

  The "Background" section below explains in detail how XtGetValues() finds the requested resource values.

Usage
  Generally  you will use the XtSetArg() macro to initialize the ArgList passed to this function.  You can also use XtVaGetValues() pass it a
  variable-length argument list instead of an ArgList array.  The "Example" section below shows an example use of this function.

  Note that some widgets provide public functions to query the value of commonly used resources.  These functions are generally  faster,  and
  it is usually better specified whether or not the caller must free the returned value.

  You can set a widget's resources with XtSetValues() or XtVaSetValues().

Example
  You can use XtGetValues() as follows to get widget resources:

     Arg args[10];
     int i;
     String label;
     Dimension margin;
     Pixel color;

     /* set up an argument list */
     i = 0;
     XtSetArg(args[i], XtNlabel, &label); i++;
     XtSetArg(args[i], XtNmargin, &margin); i++;
     XtSetArg(args[i], XtNforeground, &color); i++;

     /* query the values */
     XtGetValues(s, args, i);

     /* label, margin, and color now contain the requested values */
     printf("Widget's label is %s; margin is %d.0, label, margin);
     printf("Widget's label is %s; margin is %d.0, label, margin);

     /* In some widget sets we'd have to free label now. */
     /* XtFree(label); */

Background
  XtGetValues() looks for resources named in args using the following procedure:

  o  It  searches  the normal resource lists for the object, starting with the resources of the Object class and proceeding down the subclass
     chain to the class of the object.

  o  If the object's parent is a subclass of constraintWidgetClass, it searches the constraint resource lists of the parent, starting at con-
     straintWidgetClass and proceeding down the subclass chain to the constraint resources of the parent's class.

  Once	all the resources have been fetched from the widget's normal and constraint resources list, XtGetValues() calls the widget's get_val-
  ues_hook() methods.  get_values_hook() procedures can be used to return subpart resource  values  or	constraint  subpart  resource  values
  through  the	XtGetValues() interface (see XtGetSubvalues()) and may modify the data stored at the location addressed by the value field of
  the argument.  This means that a get_values_hook() may be used to make copies of data (such as strings) whose resource representation is  a
  pointer.  The get_values_hook() methods are called as follows:

  o  If  any  get_values_hook()  methods  in the object's class or superclass records are non-NULL, they are called in superclass-to-subclass
     order.

  o  If the object's parent is a subclass of constraintWidgetClass, and if any of the parent's class or superclass records have declared Con-
     straintClassExtension  records in the Constraint class part extension field with a record type of NULLQUARK and if the get_values_hook()
     field in the extension record is non-NULL, then XtGetValues() calls these get_values_hook() procedures in superclass-to-subclass order.

Structures
  An Arg is defined as follows:

     typedef struct {
	 String name;
	 XtArgVal value;
     } Arg, *ArgList;

See Also
  XtSetArg(1), XtSetValues(1), XtVaGetValues(1), XtVaSetValues(1),
  get_values_hook(4).

Xt - Resource Management													     XtGetValues()
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy