LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-23-2015, 12:42 PM   #1
bahramsport
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Rep: Reputation: Disabled
access a file from any directory


I need access a file from any directory for example I have a file /var/log/messages now I pwd is /home I need like PATH for execute file when in type/home#vi messages then open messages file in other directory
can help me?
 
Old 12-23-2015, 01:04 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
If you are in the home directory and want to open a files in another directory with vi, in the terminal you would type the full path.
As root:vi /var/log/messages
 
Old 12-24-2015, 04:09 AM   #3
bahramsport
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
no i khonw , i dont write complete path like execute file in $PATH ???
plz help me
 
Old 12-24-2015, 07:20 AM   #4
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 14.04 LTS
Posts: 230

Rep: Reputation: 65
Quote:
Originally Posted by bahramsport View Post
no i khonw , i dont write complete path like execute file in $PATH ???
plz help me
You have to write the complete path, otherwise it's not possible. Can you explain why you want to do that?
 
Old 12-24-2015, 11:44 AM   #5
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 11,956

Rep: Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108Reputation: 3108
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ls: cannot access *.{jpg,png}: No such file or directory angel'le Programming 5 09-28-2013 10:21 PM
how to generate file and directory access logs? dushyantgohil Linux - Server 5 10-29-2012 05:50 AM
Permissions, File, Directory access tHcnunz Linux - Newbie 3 03-26-2004 10:25 AM
File/directory access rights klmn1 Linux - Software 3 05-29-2003 02:14 AM
file/directory access permission question correro Linux - General 4 05-22-2003 08:48 PM


All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration