Q:

Unix - Whitespace at beginning of filename

How can I grep a file which has been named with a whitespace at the beginning of its name and then renamed without the space? By the way, there are other files that include "file1 name in it. The ls - l " File1" will show all files that have the "File1" name in it.
$ls -l 
drwxr-xr-x     2 root     root     1515 Apr  8 01:36   File1
drwxr-xr-x     2 root     root     1515 Apr  8 01:49  File1 
drwxr-xr-x     2 root     root     2343 Apr  8 01:54  File3 
drwxr-xr-x     2 root     root     2303 Apr  8 01:59  File4
drwxr-xr-x     2 root     root     2303 Apr  8 01:59  Another_File1

As you can see, there is a whitespace at the beginning of " File1". How can I rename " File1" to "Bad_File1"?
Thanks

A:

Just quote its name:
mv " File1" "Bad_File1"
    ^

Also note " File1" is a directory:
drwxr-xr-x     2 root     root     1515 Apr  8 01:36   File1
^

so what you are seeing with ls -l " File1" is the content of such directory.

