Sponsored Content
Top Forums Shell Programming and Scripting Take a files' path with the command 'file' ? Post 302466936 by hakermania on Wednesday 27th of October 2010 06:17:09 PM
Old 10-27-2010
MySQL

readlink does the work. Thank you very much!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How would I make a find command NOT show the path of a file?

When I do find . -name "*.txt" -size +0 -exec ls {} \; I get something like ./lpi_stdout.txt ./lpi_stderr.txt What would I need to do or pipe it into to strip off those first two characters so I just get lpi_stdout.txt lpi_stderr.txt ? Thanks for the help! (1 Reply)
Discussion started by: LordJezo
1 Replies

2. UNIX for Advanced & Expert Users

list all files with full path of the file

How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it? example. / ... ... ... /etc/inetd.conf /etc/passwd /etc/shadow ... ... ... /var/adm/messages /var/adm/messages.0 /var/adm/messages.1 ... ... ...... (4 Replies)
Discussion started by: Sowser
4 Replies

3. UNIX for Dummies Questions & Answers

command to find the path of a file

What is the command to find the path of a file if we know the file name and the root directory where the file resides.. For eg. if a file abc.dat resides in /home/mydir/myfiles/. I am looking for a command which will be fired from / directory, takes abc.dat as input and display the path of... (3 Replies)
Discussion started by: abhilashnair
3 Replies

4. UNIX for Dummies Questions & Answers

find locked files, print file path, unlock file

using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked how can I do this? I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like. Thanks! (0 Replies)
Discussion started by: alternapop
0 Replies

5. Red Hat

ls command to give full path to files

How can i perform a ls or other command to list the full paths of files from a ls? Looked through the man page for ls, no luck $ cd /tmp/ $ ls -l total 6 drwx------ 2 root root 4096 Nov 7 2008 keyring-7b5rMv drwx------ 2 bcr bcr 4096 Dec 7 2007 keyring-cGhir8 $ I'd be looking for... (1 Reply)
Discussion started by: brendan76
1 Replies

6. Shell Programming and Scripting

command to list files with path & date in a folder

Hi, I need command to display files with full path and date of files where are generated at every 5hrs in a folder. eg: /u01/app/test/orjthsd_1_1 Sun May 10 19:03:26 2009 /u01/app/test/weoiusd_1_1 Sun May 10 21:00:26 2009 thanks saha (3 Replies)
Discussion started by: saha
3 Replies

7. Shell Programming and Scripting

unzip few files but with same path and file name.

Hi Everyone, For exmaple, i have 5 .zip files. So i can do "unzip -L -o file1.zip -d /home/user1" for every 5 files. But the problem is those 5 zip files, have same path and file name. So if i use "-o", all will be overwirte. The output is unzip all files, but put all unzipped files... (1 Reply)
Discussion started by: jimmy_y
1 Replies

8. Shell Programming and Scripting

make file (include files path)

Hi All, In make file i want to include header files from my local directory and if it did not find in local directory i want to include from network directory. can any help me how i can do this?. here is the code INCLUDE=${include}/ this is point to network dir how i can add option that it... (1 Reply)
Discussion started by: goraya430
1 Replies

9. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

10. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
explain_readlink_or_die(3)				     Library Functions Manual					explain_readlink_or_die(3)

NAME
explain_readlink_or_die - read value of a symbolic link and report errors SYNOPSIS
#include <libexplain/readlink.h> ssize_t explain_readlink_or_die(const char *pathname, char *data, size_t data_size); ssize_t explain_readlink_on_error(const char *pathname, char *data, size_t data_size)) DESCRIPTION
The explain_readlink_or_die function is used to call the readlink(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_readlink(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_readlink_on_error function is used to call the readlink(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_readlink(3) function, but still returns to the caller. pathname The pathname, exactly as to be passed to the readlink(2) system call. data The data, exactly as to be passed to the readlink(2) system call. data_size The data_size, exactly as to be passed to the readlink(2) system call. RETURN VALUE
The explain_readlink_or_die function only returns on success, see readlink(2) for more information. On failure, prints an explanation and exits, it does not return. The explain_readlink_on_error function always returns the value return by the wrapped readlink(2) system call. EXAMPLE
The explain_readlink_or_die function is intended to be used in a fashion similar to the following example: ssize_t result = explain_readlink_or_die(pathname, data, data_size); SEE ALSO
readlink(2) read value of a symbolic link explain_readlink(3) explain readlink(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2009 Peter Miller explain_readlink_or_die(3)
All times are GMT -4. The time now is 03:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy