DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was trying to write a script and something got messed up(I eventually got the script working, in case you were wondering). Now I have a phantom file called sftp. It shows up in ls, the output of 'll' is here'
however, when I try to run 'll sftp' it tells me the file does not exist. The same thing happens when I try to remove it. Does anyone have any suggestions? It's more of an annoyance, so I can live w/ it, but I would like it removed
Assuming you haven't made a typo, you've made a typo.
The file is called 'stfp' not 'sftp'. I imagine you mistyped it in the script, but since you're familiar with it you know it should be 'sftp' and this is why you have the problem
The filename may contain nonprinting characters. This could explain why you see it with 'll' but not with 'll stfp'. One way of getting it removed is this:
rm -i *
The '-i' is *very* important as it makes rm interactive and prompts you before removing any file. As a precaution you can move all the 'good' files away to a safe place before attempting the delete.
Originally posted by microsoft/linux I was trying to write a script and something got messed up(I eventually got the script working, in case you were wondering). Now I have a phantom file called sftp. It shows up in ls, the output of 'll' is here'
however, when I try to run 'll sftp' it tells me the file does not exist. The same thing happens when I try to remove it. Does anyone have any suggestions? It's more of an annoyance, so I can live w/ it, but I would like it removed
you should try doing "ls -l --escape *stfp*" as the "--escape" option puts the non-printable characters to be escaped and visiable. such as leading space(s) or other control characters. You see that all most any character is allowed in a filename (even though several characters should be avoided due to having to quote them).
Lot's of interesting ideas, obvious time to re-read the ls FM.
Midnight Commander (mc) is a great way to deal w/ non-printing & suspected non-printing characters. It's close to the 2nd thing I do & the 1st thing I install on a new box:
Maybe we ought to change, at least occasionally, "RTFM" TO "RRTFM" -- as in re-read ...
Two of my "favorites" that I keep going back to are: ls & less. They both are amazingly rich. I also go out of my way to post code snippets that use what I see as the coolest features of each. I hope to pique people's interest in "what's that weird option" & provoke an RTFM.
With the risk of going OT, the problem with complete newbies isn't (hopefully) lack of wanting to read, it's not knowing where to start and what to read as well as not understanding what the man pages say. http://www.linuxlinks.com/Beginners/ is a good place to start imho.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.