Linux: Change name of the "tail -f /var/log/log.txt" process in PS and TOP

As said above I need the process to be hidden/name-changed for all users. Embedding it into another process like sshd is also acceptable.
Who is Participating?
woolmilkporcConnect With a Mentor Commented:
Why would you want to do that?

Anyway, I think it's not possible using high level languages like bash or ksh.

Maybe Perl's "File::Tail" module could be useful.

Here is the very basic example from CPAN, slightly adjusted:

  use File::Tail;
  while (defined($line=$file->read)) {
      print "$line";

and here is the link, containing a more sophisticated example:

You could of course go the very easy way by creating softlinks to "tail" as well as to "/var/log/log.txt":

cd /some/dir
ln -s /usr/bin/tail foo
ln -s /var/log/log.txt bar

Now you can run:

cd /some/dir
./foo -f bar
SanctionAuthor Commented:
Thanks, exactly what I was looking for! And to answer your question I am learning Linux Security using offensive tactics.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.