01-11-2014
What operating system are you using?
What shell are you using?
What have you tried so far?
Show us your "previous day function".
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure,
say location 1,
/home/rick/tmp_files/1-12/00-25/
here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies
2. Shell Programming and Scripting
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies
3. Shell Programming and Scripting
Hello all! I am trying to create a script that will copy files from one location, to another but only folders that are filled with thumbnails to an exact directory replica in the second location. For example:
/images/2012/01/19/Event/Photographer/thumbnails
to
... (4 Replies)
Discussion started by: Buzzman25
4 Replies
4. UNIX for Dummies Questions & Answers
:EDIT:
I think my post name should have been labeled: how to copy files and record original file location. not "retain".
Hello, this is my first post! I searched the forums a lot before posting, but was unable to answer my question.
Here's my problem:
There are several hundred text files... (4 Replies)
Discussion started by: willie8605
4 Replies
5. Shell Programming and Scripting
Hi Gurus,
I am a newbie to shell scripting and I am facing a problem right now.I have to automate the copy of files based on a priority.The scenario is as below:
1) There will be files from Mon-Fri with Mon file being named as abc_def_01_YYYYMMDD and Tue file being abc_def_02_YYYYMMDD and so... (4 Replies)
Discussion started by: vikramgk9
4 Replies
6. Shell Programming and Scripting
Hello Experts,
I need to copy files from one location to another using xargs.
Tried something like this (In Ubuntu & Solaris ).
mkdir -p 1234;
find /home/emd/Desktop/n007/M007/ -type f -name "A2014*" | xargs -0 cp -r {} /home/emd/Desktop/1234
But every time i run this, a weird error... (6 Replies)
Discussion started by: Saidul
6 Replies
7. Post Here to Contact Site Administrators and Moderators
Hi guys...please any one help me ....
how to copy files from source to target location
if 5 files copied successfully out of 10 files then implement success=10
and if remaining 5 files not copied successfully then count error=5
how to implement this condition with in loop
i need code linux... (0 Replies)
Discussion started by: sravanreddy
0 Replies
8. Shell Programming and Scripting
Hello there wonderful people,
I am running on Solaris 10 and with the following ksh version:
strings /bin/ksh | grep Version | tail -2
@(#)Version M-11/16/88i
Suppose I want to copy files that end in _v2 from underneath /dir1/dir2/save directory to /dir1/dir2. Basically, what I’m... (12 Replies)
Discussion started by: ejianu
12 Replies
9. Shell Programming and Scripting
Hello All,
Since i'm relatively new in shell script need your guidance.
I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder.
so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies
10. UNIX for Beginners Questions & Answers
Hello everyone, Im super new to coding but increasingly in need of it at work. Im have task stacked because of this problems, that I cannot figure out how to solve looking on the internet after trying many many things that looked similar to me.
I have multiple data files of the form (see below).... (2 Replies)
Discussion started by: Xfiles_fan
2 Replies
LEARN ABOUT OSF1
setusershell_r
getusershell(3) Library Functions Manual getusershell(3)
NAME
getusershell, getusershell_r, setusershell, setusershell_r, endusershell, endusershell_r - Get the names of legal user shells
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
char *getusershell(void);
int setusershell(void);
int endusershell(void);
The following obsolete functions are supported in order to maintain backward compatibility with previous versions of the operating system.
You should not use them in new designs. int getusershell_r( char *shell, int len unsigned int *state);
int setusershell_r( unsigned int *state);
int endusershell_r( unsigned int *state);
PARAMETERS
Points to a buffer for the shell name. Specifies the length of the shell parameter. Points to a variable which stores information about
the contents of the /etc/shells file.
DESCRIPTION
The getusershell() function returns a pointer to a string that contains the name of a legal user shell as defined by the system manager in
the /etc/shells file. If the /etc/shells file does not exist, the standard system shells are returned.
On subsequent calls, the getusershell() function returns the next shell. The endusershell() function resets the list so that subsequent
calls of getusershell() reread the list from /etc/shells. The setusershell() function rereads the list from /etc/shells and subsequent
calls of getusershell() start from the beginning.
NOTES
The getusershell() function returns a pointer to thread-specific data. Subsequent calls to the function from the same thread overwrite
this data.
The getusershell_r(), setusershell_r(), and endusershell_r() functions are obsolete reentrant versions of the getusershell(), setuser-
shell(), and endusershell() functions. They are supported in order to maintain backward compatibility with previous versions of the oper-
ating system and should not be used in new designs. Note that you must initialize the state parameter to 0 (zero) before its first access
by any of these functions.
RETURN VALUES
Upon successful completion, the getusershell() function returns a pointer to a character string. If it fails or reaches the end of the
shell file, it returns a null pointer.
Upon successful completion, the getusershell_r() function stores a pointer to the shell name in shell and returns a value of 0 (zero).
Upon failure, it returns a value of -1 and places an appropriate value in the errno variable.
Upon successful completion, the setusershell_r() function returns a value of 0 (zero). Upon failure, it returns a value of -1 and places
an appropriate value in the errno variable.
The endusershell_r() function always returns a value of 0 (zero).
ERRORS
If any of the following conditions occurs, the getusershell_r() function sets errno to the corresponding value:
Either the shell parameter is invalid, the len parameter is too small, or the state parameter is a null pointer. The end of the shell list
has been reached (EOF).
If the following condition occurs, the setusershell_r() function sets errno to the corresponding value: Unable to allocate memory for the
reread list of shells.
FILES
Contains the names of legal user shells.
RELATED INFORMATION
Files: shells(4).
delim off
getusershell(3)