LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Reply
  Search this Thread
Old 01-10-2008, 10:34 AM   #1
sridhar_yerram
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
how to know the files and directories which are opened?


hello friends..
iam a newbie to linux..
i used "lsof" to know which files are opened..
if the file is opened using "vim" i can make it out ..the
name of the file..
if i open the same file with "gedit" or "oowriter" i was not
able to know which file i have opened....
..& one more question is how to know which
directory is opened using "nautilus" file browser..does it stores
the information anywhere..when it opens....
.....
thanks in advance..........
sridhar( sridhar.yerram@gmail.com)
 
Old 01-11-2008, 03:59 AM   #2
norbert74
Member
 
Registered: Apr 2006
Posts: 63

Rep: Reputation: 23
As far as I know these editors don't keep the file permanently open, they work with a copy instead.
That's why lsof does not show the file because it's actually not open.
If you want to see that the file was opened even if it was only for a very short moment you could use strace, e.g.:
strace -e trace=open kate /home/test/file.txt
This displays all open system calls for the command "kate /home/test/file.txt" and you will definetly see the file beeing opened.
 
  


Reply


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
Find out the number of files currently opened closet geek Linux - Kernel 5 05-19-2015 09:19 AM
Copying files and sub-directories of a directory except the directories named ".abc" sri1025 Linux - General 2 08-24-2010 09:53 AM
apache logs files can't be opened? benrose111488 Linux - Software 14 06-26-2007 01:54 PM
What means Pipe failed, too many files opened? geom06005 Slackware 4 05-08-2007 05:15 PM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:27 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
Open Source Consulting | Domain Registration