Skip to main content
20 events
when toggle format what by license comment
Sep 27, 2020 at 12:29 vote accept 林果皞
Sep 26, 2020 at 17:13 answer added Stéphane Chazelas timeline score: 1
Jan 24, 2018 at 9:01 history edited 林果皞 CC BY-SA 3.0
chmod +x is redundant.
Jan 24, 2018 at 8:53 history edited 林果皞 CC BY-SA 3.0
In case someone run this command without cd to /tmp first, so I modified it to make it work on anywhere.
Jan 24, 2018 at 8:44 history edited 林果皞 CC BY-SA 3.0
deleted 10 characters in body
Jan 24, 2018 at 8:33 history edited 林果皞 CC BY-SA 3.0
removed redundant commands.
Jan 22, 2018 at 19:32 history tweeted twitter.com/StackUnix/status/955523681672982530
Jan 20, 2018 at 17:43 history edited 林果皞 CC BY-SA 3.0
typo
Jan 20, 2018 at 14:25 history edited 林果皞 CC BY-SA 3.0
added -f
Jan 20, 2018 at 14:10 history edited 林果皞 CC BY-SA 3.0
added 866 characters in body
Jan 19, 2018 at 22:30 comment added 林果皞 @AndyDalton So the first parameter is always the script even though the parameter put in between ? I'm not on my machine now and will check later.
Jan 19, 2018 at 22:29 answer added Andy Dalton timeline score: 0
Jan 19, 2018 at 22:26 comment added Andy Dalton The first token would be the command, everything else would be a parameter. If it's a shell script, the first token would be the shell, the first parameter will be the script, and the rest will be parameters to that script. In the general case, I don't understand how looking at /proc/<pid/fd is going to tell you anything about the command itself.
Jan 19, 2018 at 22:23 comment added 林果皞 @AndyDalton But I have no way to distiguish between parameters with executing path from cmdline. And I figure out fd example can get the path, i.e. /tmp/a.sh
Jan 19, 2018 at 22:21 comment added Andy Dalton If you want the path of the process, couldn't you look at /proc/<pid>/cmdline?
Jan 19, 2018 at 22:10 comment added 林果皞 @AndyDalton I learn this trick from this answer: stackoverflow.com/a/16131743/1074998 . What I want to do is get the path (and also executed path if it's shell) of all running process pid and then use dpkg-query to print the package description, manual, filetype into single file. I just done similar concept for a specific directory at github.com/limkokhole/binaries_brief, but now I want to apply it on all running processes too.
Jan 19, 2018 at 21:19 comment added Andy Dalton Rather than describing your approach to answering your own question, I suggest that you edit the question to tell is what you're trying to accomplish. I don't understand how "full path executed from any shell process" has anything to do with open files.
Jan 19, 2018 at 16:33 history edited 林果皞 CC BY-SA 3.0
remove unrelated tr '\n' '\0'
Jan 19, 2018 at 16:23 comment added Jeff Schaller Relating: unix.stackexchange.com/a/377514/117549
Jan 19, 2018 at 16:18 history asked 林果皞 CC BY-SA 3.0