0

I am removing a file which has been identified as infected. This file has dots and windows-style backslashes in the name. (Linux directories are separated with slashes like this "/" whereas this file contains slashes like this "\")

The actual file name is (note this is not a path, this entire string is the name):

..\lib\plugin\amd.dll

This pasted text shows me viewing that file with ls -lah (see line 4)

-rw-rw----  1 mysql mysql 9.3K Aug 11  2014 host.frm
-rw-rw----  1 mysql mysql    0 Aug 11  2014 host.MYD
-rw-rw----  1 mysql mysql 2.0K Aug 11  2014 host.MYI
-rw-rw-rw-  1 mysql mysql  40K Nov  9  2014 ..\lib\plugin\amd.dll
-rw-rw----  1 mysql mysql 8.4K Feb  7  2015 lokfdh.frm
-rw-rw----  1 mysql mysql 8.6K Aug 11  2014 ndb_binlog_index.frm
-rw-rw----  1 mysql mysql    0 Aug 11  2014 ndb_binlog_index.MYD
-rw-rw----  1 mysql mysql 1.0K Aug 11  2014 ndb_binlog_index.MYI

HOWEVER if I simply use "ls" alone, the file is not shown. See the below pasted text without the file. With "ls -lah" (shown above) the file appears right after "host.MYI" but with "ls" alone (shown below), the file does not appear at all.

host.frm
host.MYD
host.MYI
lokfdh.frm
ndb_binlog_index.frm
ndb_binlog_index.MYD
ndb_binlog_index.MYI

My question is, why do I need to use "ls -lah" to see it? Why doesn't "ls" alone show it?

Thank you.

Jack Amoratis
  • 273
  • 3
  • 9
  • 1
    Could you please cut-and-paste text into your question? Screenshots are both wasteful of storage, and cannot easily be indexed. When graphics are involved, they may be unavoidable; but for text, this is not so. – MadHatter Apr 16 '16 at 14:20
  • Good point MadHatter! I will do that – Jack Amoratis Apr 16 '16 at 14:25

1 Answers1

3

It's specifically -a which makes a difference.

From ls(1):

   -a, --all
          do not ignore entries starting with .

Ie, normally filenames beginning with a dot (.) are considered "hidden" (often used for eg configuration files in a user's home directory).

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94