Sponsored Content
Top Forums Shell Programming and Scripting Copy real file from a shortcut preserving the time stamps and directory tree Post 302782341 by gogok_bg on Monday 18th of March 2013 02:53:35 PM
Old 03-18-2013
I have readlink since i am with linux mint soo can someone pls tell me how to do the original task Smilie ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read from fileList.txt, copy files from directory tree

Hi, hopefully this is a fairly simple Q&A. I have a clean file list of approximately 180 filenames with no directory or slashes in front of the filename nor any extension or dot ".". I would like to read from this list, find these files recursively down through directory trees, copy the files... (1 Reply)
Discussion started by: fxvisions
1 Replies

2. Shell Programming and Scripting

Recursively copy only specific files from a directory tree

Hi I am a shell-script newbie and am looking to synchronize certain files in two directory structures. Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over. I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies

3. UNIX for Dummies Questions & Answers

comparing time stamps

Hello All, I'm generating timestamps (file creation timestamps) for all the files in a directory. I need to compare all the timestamps. for example if i have 4 files and their timestamps are 20091125114556, 20091125114556,20091125114556,20091125114556 respectively. I need to differentiate... (1 Reply)
Discussion started by: RSC1985
1 Replies

4. Shell Programming and Scripting

Perl - Search file between two time stamps

Hi, I am on a windows system that receives files from differnet host, I have to find the count of files that we receive between specific time. The code below is what i use to count the number of file, how do i change this to count files between specfic time opendir ( DIR, $dir ) || die... (1 Reply)
Discussion started by: amit1_x
1 Replies

5. UNIX for Dummies Questions & Answers

How to copy a tree of directory

Mi question is how can you copy only de three of directory and not the files in it. Only a need the three of directorys not the files (6 Replies)
Discussion started by: enkei17
6 Replies

6. UNIX for Dummies Questions & Answers

Copy directory tree with files

Iam in the process of copying a directory with thousands of directories and files into a new directory. I need to preserve permissions, owner, group, date and timestamps, everything. Iam using AIX and would need help of writing the command whether it is cp-RP or cpio. Apprecaite your... (3 Replies)
Discussion started by: baanprog
3 Replies

7. Shell Programming and Scripting

Increment time stamps.

Hi Gents. Please can you help me to solve a problem. I have a long list of files, which I need to change the time stamp. -r--r--r-- 1 geo2 geovect 47096216 Feb 8 10:40 00000009.segd -r--r--r-- 1 geo2 geovect 47096216 Feb 8 10:40 00000010.segd -r--r--r-- 1 geo2 geovect 47096216 Feb ... (11 Replies)
Discussion started by: jiam912
11 Replies

8. UNIX for Dummies Questions & Answers

[SOLVED] Copy subfolder to another directory preserving parent name

Hi, I have the following folder structure: Folder6100/Data Folder6100/Data Folder6120/Data Folder6120/Data Folder6140/Data Folder6140/Data Folder6160/Data Folder6160/Data Folder6180/Data Folder6180/Data Folder6200/Data Folder6220/Data Folder6240/Data Folder6260/Data... (2 Replies)
Discussion started by: alex2005
2 Replies

9. Shell Programming and Scripting

How to get the Logs between two Time Stamps?

Hi, I have been working on the error Log script, where errors are pulled from server. I need to pull the data of the error logs between two dates & time, for example : 22/12/2014 20:00:00 22/12/2014 22:00:00 Whatever error have came during this duration. Now the question is the record... (6 Replies)
Discussion started by: amitgpta90
6 Replies

10. Shell Programming and Scripting

Copy Directory Tree from one Server to Another

Hi, I have a serverA with Directory "/opt/app/myfiles" which is 8.5GB with more than 40000 files and 45 folders in it. I wish to transfer the folder "/opt/app/myfiles" tree structure with all the sub-directories and skip all files to another serverB. I would appreciate a command that... (4 Replies)
Discussion started by: mohtashims
4 Replies
explain_readlink(3)					     Library Functions Manual					       explain_readlink(3)

NAME
explain_readlink - explain readlink(2) errors SYNOPSIS
#include <libexplain/readlink.h> const char *explain_readlink(const char *pathname, char *data, size_t data_size); const char *explain_errno_readlink(int errnum, const char *pathname, char *data, size_t data_size); void explain_message_readlink(char *message, int message_size, const char *pathname, char *data, size_t data_size); void explain_message_errno_readlink(char *message, int message_size, int errnum, const char *pathname, char *data, size_t data_size); DESCRIPTION
These functions may be used to obtain explanations for errors returned by the readlink(2) system call. explain_readlink const char *explain_readlink(const char *pathname, char *data, size_t data_size); The explain_readlink function is used to obtain an explanation of an error returned by the readlink(2) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (readlink(pathname, data, data_size) < 0) { fprintf(stderr, "%s ", explain_readlink(pathname, data, data_size)); exit(EXIT_FAILURE); } pathname The original pathname, exactly as passed to the readlink(2) system call. data The original data, exactly as passed to the readlink(2) system call. data_size The original data_size, exactly as passed to the readlink(2) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_readlink const char *explain_errno_readlink(int errnum, const char *pathname, char *data, size_t data_size); The explain_errno_readlink function is used to obtain an explanation of an error returned by the readlink(2) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (readlink(pathname, data, data_size) < 0) { int err = errno; fprintf(stderr, "%s ", explain_errno_readlink(err, pathname, data, data_size)); exit(EXIT_FAILURE); } errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the readlink(2) system call. data The original data, exactly as passed to the readlink(2) system call. data_size The original data_size, exactly as passed to the readlink(2) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_readlink void explain_message_readlink(char *message, int message_size, const char *pathname, char *data, size_t data_size); The explain_message_readlink function may be used to obtain an explanation of an error returned by the readlink(2) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (readlink(pathname, data, data_size) < 0) { char message[3000]; explain_message_readlink(message, sizeof(message), pathname, data, data_size); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. pathname The original pathname, exactly as passed to the readlink(2) system call. data The original data, exactly as passed to the readlink(2) system call. data_size The original data_size, exactly as passed to the readlink(2) system call. explain_message_errno_readlink void explain_message_errno_readlink(char *message, int message_size, int errnum, const char *pathname, char *data, size_t data_size); The explain_message_errno_readlink function may be used to obtain an explanation of an error returned by the readlink(2) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (readlink(pathname, data, data_size) < 0) { int err = errno; char message[3000]; explain_message_errno_readlink(message, sizeof(message), err, pathname, data, data_size); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. pathname The original pathname, exactly as passed to the readlink(2) system call. data The original data, exactly as passed to the readlink(2) system call. data_size The original data_size, exactly as passed to the readlink(2) system call. SEE ALSO
readlink(2) blah blah blah explain_readlink_or_die(3) blah blah blah and report errors COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_readlink(3)
All times are GMT -4. The time now is 06:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy