Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Ole Tange
tangetools
Commits
774a5e5d
Commit
774a5e5d
authored
May 23, 2016
by
Ole Tange
Browse files
tracefile: add --dir.
parent
96f2c1c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
Makefile
Makefile
+0
-1
tracefile/tracefile
tracefile/tracefile
+26
-5
No files found.
Makefile
View file @
774a5e5d
...
@@ -5,7 +5,6 @@ all: blink/blink.1 goodpasswd/goodpasswd.1 histogram/histogram.1 rand/rand.1 rrm
...
@@ -5,7 +5,6 @@ all: blink/blink.1 goodpasswd/goodpasswd.1 histogram/histogram.1 rand/rand.1 rrm
%.1
:
%
%.1
:
%
pod2man
$<
>
$@
pod2man
$<
>
$@
install
:
install
:
mkdir
-p
/usr/local/bin
mkdir
-p
/usr/local/bin
parallel
eval ln
-sf
`
pwd
`
/
*
/
{}
/usr/local/bin/
{}
::: blink reniced em field forever neno rn stdout tracefile w4it-for-port-open upsidedown histogram goodpasswd mtrr not summer timestamp transpose wssh aptsearch rand rrm
parallel
eval ln
-sf
`
pwd
`
/
*
/
{}
/usr/local/bin/
{}
::: blink reniced em field forever neno rn stdout tracefile w4it-for-port-open upsidedown histogram goodpasswd mtrr not summer timestamp transpose wssh aptsearch rand rrm
...
...
tracefile/tracefile
View file @
774a5e5d
...
@@ -6,9 +6,9 @@ tracefile - list files being accessed
...
@@ -6,9 +6,9 @@ tracefile - list files being accessed
=head1 SYNOPSIS
=head1 SYNOPSIS
B<tracefile> [-aenu] I<command>
B<tracefile> [-a
d
enu] I<command>
B<tracefile> [-aenu] -p I<pid>
B<tracefile> [-a
d
enu] -p I<pid>
=head1 DESCRIPTION
=head1 DESCRIPTION
...
@@ -16,7 +16,7 @@ B<tracefile> will print the files being accessed by the command.
...
@@ -16,7 +16,7 @@ B<tracefile> will print the files being accessed by the command.
=head1 OPTIONS
=head1 OPTIONS
=over
9
=over
12
=item I<command>
=item I<command>
...
@@ -25,25 +25,43 @@ Command to run.
...
@@ -25,25 +25,43 @@ Command to run.
=item B<-a>
=item B<-a>
=item B<--all>
List all files.
List all files.
=item B<-d>
=item B<--dir>
List only dirs.
=item B<-e>
=item B<-e>
=item B<--exist>
List only existing files.
List only existing files.
=item B<-n>
=item B<-n>
=item B<--nonexist>
List only non-existing files.
List only non-existing files.
=item B<-p> I<pid>
=item B<-p> I<pid>
=item B<--pid> I<pid>
Trace process id.
Trace process id.
=item B<-u>
=item B<-u>
=item B<--unique>
List only files once.
List only files once.
=back
=back
...
@@ -72,7 +90,7 @@ Report bugs to <tange@gnu.org>.
...
@@ -72,7 +90,7 @@ Report bugs to <tange@gnu.org>.
=head1 AUTHOR
=head1 AUTHOR
Copyright (C) 2012 Ole Tange, http://ole.tange.dk and Free
Copyright (C) 2012
,2016
Ole Tange, http://ole.tange.dk and Free
Software Foundation, Inc.
Software Foundation, Inc.
...
@@ -202,7 +220,7 @@ $Global::progname = "tracefile";
...
@@ -202,7 +220,7 @@ $Global::progname = "tracefile";
Getopt::Long::
Configure
("
bundling
","
pass_through
");
Getopt::Long::
Configure
("
bundling
","
pass_through
");
get_options_from_array
(
\
@ARGV
)
||
die_usage
();
get_options_from_array
(
\
@ARGV
)
||
die_usage
();
if
(
not
(
$
opt::
exists
or
$
opt::
nonexists
or
$
opt::
all
))
{
if
(
not
(
$
opt::
exists
or
$
opt::
nonexists
or
$
opt::
all
or
$
opt::
dir
))
{
$
opt::
all
=
1
;
$
opt::
all
=
1
;
}
}
...
@@ -227,6 +245,8 @@ while(<IN>) {
...
@@ -227,6 +245,8 @@ while(<IN>) {
or
or
(
$
opt::
exists
and
-
e
$file
)
(
$
opt::
exists
and
-
e
$file
)
or
or
(
$
opt::
dir
and
-
d
$file
)
or
(
$
opt::
nonexists
and
not
-
e
$file
))
{
(
$
opt::
nonexists
and
not
-
e
$file
))
{
$print
=
1
;
$print
=
1
;
}
}
...
@@ -241,6 +261,7 @@ sub options_hash {
...
@@ -241,6 +261,7 @@ sub options_hash {
# Returns a hash of the GetOptions config
# Returns a hash of the GetOptions config
return
return
("
debug|D
"
=>
\
$
opt::
debug
,
("
debug|D
"
=>
\
$
opt::
debug
,
"
dir|d
"
=>
\
$
opt::
dir
,
"
uniq|unique|u
"
=>
\
$
opt::
unique
,
"
uniq|unique|u
"
=>
\
$
opt::
unique
,
"
exists|exist|e
"
=>
\
$
opt::
exists
,
"
exists|exist|e
"
=>
\
$
opt::
exists
,
"
nonexists|nonexist|non-exists|non-exist|n
"
=>
\
$
opt::
nonexists
,
"
nonexists|nonexist|non-exists|non-exist|n
"
=>
\
$
opt::
nonexists
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment