You are not logged in.
The file name is -#, and I can't access
[root@mimas alex]# ls -lA
-rw-r--r-- 1 root root 454 Jul 28 22:19 -#
-rw------- 1 alex alex 5935 Jul 30 23:14 .bash_history
-rw-r--r-- 1 alex alex 21 Jun 4 2013 .bash_logout
-rw-r--r-- 1 alex alex 57 Jun 4 2013 .bash_profile
-rw-r--r-- 1 alex alex 141 Jun 4 2013 .bashrc
drwxr-xr-x 2 alex alex 4096 Jul 29 12:00 .ssh
drwxr-xr-x 2 alex alex 4096 Jul 21 08:00 tmp_mnt
-rw------- 1 alex alex 922 Jul 29 13:58 .viminfo
[root@mimas alex]# less -#
Value is required after -# (--shift)
[root@mimas alex]# less /-#
/-#: No such file or directory
[root@mimas alex]# less \-#
Value is required after -# (--shift)
[root@mimas alex]# vi -#
vi: illegal option -- #
Usage: vi [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]
[-v] [-V] [-w size] [+cmd | -c cmd] file...
[root@mimas alex]# vi \-#
vi: illegal option -- #
Usage: vi [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]
[-v] [-V] [-w size] [+cmd | -c cmd] file...
[root@mimas alex]#
Can anyone please reassure that it is OK to
#rm ./-#
? Thanks.
_________________________________________________________________
"The journey is the reward"
SJ
Offline
less "./-#"
Maybe?
Offline
That was an interesting experiment:
ewaller@turing ~/tmp [1]1023 %touch '-#'
touch: invalid option -- '#'
Try 'touch --help' for more information.
ewaller@turing ~/tmp [1]1024 %touch ./-#
zsh: no matches found: ./-#
ewaller@turing ~/tmp [1]1025 %touch ./\-\#
ewaller@turing ~/tmp 1026 %ll
total 0
-rw-r--r-- 1 ewaller ewaller 0 Jul 31 09:23 -#
ewaller@turing ~/tmp 1027 %rm ./\-\#
ewaller@turing ~/tmp 1028 %ll
total 0
ewaller@turing ~/tmp 1029 %
Last edited by ewaller (2015-07-31 16:25:50)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
To access it use 'cat -- -#', 'less -- -#', etc. The problem is that without '--' the programs are trying to treat the filename as a flag. '--' is common to many programs and indicates there are no more flags after it, so anything that comes next is not treated as a flag even if it looks like a flag.
You should also figure out what's causing the file to be created. Hopefully getting a look inside it will help with that.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Not a Sysadmin issue, moving to NC...
Offline
To access it use 'cat -- -#', 'less -- -#', etc. The problem is that without '--' the programs are trying to treat the filename as a flag. '--' is common to many programs and indicates there are no more flags after it, so anything that comes next is not treated as a flag even if it looks like a flag.
You should also figure out what's causing the file to be created. Hopefully getting a look inside it will help with that.
Thanks for the tip! This worked, and here is the result:
[alex@mimas ~]$ cat -- -#
<html>
<head><title>Found</title></head>
<body>
<h1>Found</h1>
<p>The resource was found at <a href="https://dl.dropboxusercontent.com/u/###### info voluntary removed #########">https://dl.dropboxusercontent.com/u/###### info voluntary removed #########</a>;
you should be redirected automatically.
<!-- --></p>
<hr noshade>
<div align="right">WSGI Server</div>
</body>
</html>
Upon seeing this, I remembered that I used curl (for the first time) to download some pictures that were in my dropbox public folder.
Interesting, isn't it ?
_________________________________________________________________
"The journey is the reward"
SJ
Offline