Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #14626

Re: List files being edited ?

From no.top.post@gmail.com
Newsgroups alt.os.linux.slackware, alt.os.linux.debian, comp.os.linux.misc
Subject Re: List files being edited ?
Date 2015-04-25 08:59 +0000
Organization A noiseless patient Spider
Message-ID <mhfl1e$98f$1@dont-email.me> (permalink)
References <mhdle4$4j6$1@dont-email.me>

Cross-posted to 3 groups.

Show all headers | View raw


In article <mhdle4$4j6$1@dont-email.me>, Joe Beanfish <joebeanfish@nospam.duh> wrote: 

> On Fri, 24 Apr 2015 03:29:49 +0000, no.top.post wrote:
> > What's the script to list all the files <open under mcedit>?
> > It's for human consuption, so need not be 'clean';
> 
> Perhaps
> 
> awk '/mcedi[t]/{gsub("\0"," ");print}' /proc/*/cmdline

! Amazing !!
? List all mcedi in  /proc/*/cmdline ?

Without yet understanding the details, I can imediately USE that,
to popup NoteFiles for the critical jobs, while navigating any of
the 2-dozen workspaces. 
blackbox:WindowManager's ability to make the NoteFiles sticky
[follow to all WS] is problematic.

> Of course that assumes the user hasn't switched files since
> starting mcedit.
> 
> The [t] after mcedi prevents awk from matching itself.
> Also print FILENAME if you want the PID of the process.

First I'll need to understand/refresh awk basics.

A related problem that I've been looking to solve for 10 years:--
It's an error to umount, eg. a USBstik which has its inactive
[one of two] panel of mc on the USBstik's path.

   for Mpath in `pgrep mc`; do 
       lsof | grep $Mpath | grep cwd |awk '{print $2 ":" $9}'; done
show me the path that each mc is <active on>.

If mc in WorkSpace-21 is 'holding' the path and is covered by another 
<Frame>, it's a big problem to manually uncover & search all the mc/s.

Obviously mc-internally knows the inactive-Panel's path for each pid,
but is seems that /proc/* and lsof doesn't.

Thanks for another great tool to help navigate lifes chaos.

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

List files being edited ? no.top.post@gmail.com - 2015-04-24 03:29 +0000
  Re: List files being edited ? Joe Beanfish <joebeanfish@nospam.duh> - 2015-04-24 14:53 +0000
    Re: List files being edited ? no.top.post@gmail.com - 2015-04-25 08:59 +0000
      Re: List files being edited ? William Unruh <unruh@invalid.ca> - 2015-04-25 14:34 +0000
        Re: List files being edited ? Helmut@Hullen.de (Helmut Hullen) - 2015-04-25 18:26 +0200
        Re: List files being edited ? Unknown <dog@gmail.com> - 2015-06-15 13:58 +0000
          Re: List files being edited ? William Unruh <unruh@invalid.ca> - 2015-06-15 15:37 +0000
            Re: List files being edited ? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2015-06-15 20:10 +0300
          Re: List files being edited ? "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2015-06-15 20:51 +0200
            Re: List files being edited ? William Unruh <unruh@invalid.ca> - 2015-06-17 03:53 +0000

csiph-web