Help in UNIX | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Help in UNIX

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-07-2013
Srivathsava Srivathsava is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 12 February 2013, 11:56 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Help in UNIX

Hi friends,
I am new to UNIX. My issue is..... We are having a path like a/b/c/d/outfiles. The output files generated during execution of program are saved in this path(all output files will be with extension '.out' like output1.out). Is there any UNIX command to jump directly to the path *outfiles*? And is there any command to find the path of the file output1.out directly without searching for that path and downloading the file?
I am trying to use the command find . -name output1.out. ( It will search all the files in current directory and the sub directory). But if I am in a/b directory and searching for that file with that command and if any sub folders of b,c or d doesn't have read permissions, its stopped searching there.
Please help me.
Sponsored Links
    #2  
Old 02-07-2013
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 24 November 2014, 3:00 PM EST
Location: Switzerland - GE
Posts: 5,925
Thanks: 165
Thanked 431 Times in 403 Posts
Usually the output goes wherever the developper has decided or where specified by a configuration file etc... So no there is no unix command to jump there if it were not an alias.
About find, I am not sure it stops when it cant read ( should continue...), but sure it will insult you...
What OS are you using?
Sponsored Links
    #3  
Old 02-07-2013
alister alister is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 11 June 2014, 8:40 PM EDT
Posts: 3,231
Thanks: 179
Thanked 973 Times in 789 Posts
Quote:
Originally Posted by Srivathsava View Post
But if I am in a/b directory and searching for that file with that command and if any sub folders of b,c or d doesn't have read permissions, its stopped searching there.
That's the entire point of the security model. If you do not have read permission you are not allowed to read. You either need to run find as a different user, one that has read permission, or the file hierarchy's ownership and/or permissions need to be modified.

If I recall correctly, for a find traversal you'll need read permissions for every directory that is visited, and execute (search) permissions for every path component, even if it's upstream and not visited. So if you start your search at directory "d" with hopes of reaching "f", whose path is /a/b/c/d/e/f/, you will need execute permission on every directory from the root to "f", but you'll only need read permissions for "d", "e", and "f".

With cd , you can "jump" to a directory, but only if you know its location and have execute permission on every directory above it. If you lack that permission on even just one of its ancestors, you won't be able to make it the current working directory. Once in that directory, you'll still need read permission to list its contents and write permission to create/delete files.

Regards,
Alister

Last edited by alister; 02-07-2013 at 12:41 PM..
    #4  
Old 02-07-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 22 November 2014, 10:54 PM EST
Location: Simplicity
Posts: 2,053
Thanks: 134
Thanked 603 Times in 547 Posts
If

Code:
cd a/b/c/d/outfiles

is allowed, and only read=browse is denied for one of the above directories,
you can make a symlink

Code:
ln -s a/b/c/d/outfiles outfiles
ls -l outfiles
cd outfiles
/bin/pwd

Sponsored Links
    #5  
Old 02-08-2013
Srivathsava Srivathsava is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 12 February 2013, 11:56 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Whats about the delimiter commands? Can we use them to find the directory. IF so, how we can use it?
Sponsored Links
    #6  
Old 02-08-2013
MKR MKR is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 6 July 2013, 12:22 AM EDT
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
RedHat

Hi,

So far the situation is concerned without permission it is not possible either to jump
directly or to have a softlink. Since without permission the same will not be executed.
Moreover it will not let the other users to get in the sub-directories.

To over look the permission error message you can opt for the below
command.

find . -name output1.out 2>/dev/null
Sponsored Links
    #7  
Old 02-08-2013
Srivathsava Srivathsava is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 12 February 2013, 11:56 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Is there any other way to locate the outfile1.out file directly from any of the parent directories? (Without saying any permission denied messages )
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How does unix system administration, unix programming, unix network programming differ? thulasidharan2k UNIX for Dummies Questions & Answers 0 06-09-2011 10:40 AM
FTP script for sending a file from one unix directory to another unix server director raja_1234 Shell Programming and Scripting 1 11-30-2006 07:57 AM
missing Path(in UNIX) when i launch a job on to unix machine using windows SSh megastar UNIX for Advanced & Expert Users 1 11-04-2005 07:36 AM
UNIX problem? Unix programm runs windows 2000 CPU over 100% zerocool UNIX for Dummies Questions & Answers 2 11-06-2001 05:25 AM



All times are GMT -4. The time now is 06:30 PM.