Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #14749 > unrolled thread
| Started by | helge <w4h@nurfuerspam.de> |
|---|---|
| First post | 2015-05-11 10:10 +0000 |
| Last post | 2015-05-16 18:23 +0000 |
| Articles | 10 — 8 participants |
Back to article view | Back to comp.os.linux.misc
Unnamed documents helge <w4h@nurfuerspam.de> - 2015-05-11 10:10 +0000
Re: Unnamed documents Richard Kettlewell <rjk@greenend.org.uk> - 2015-05-11 11:17 +0100
Re: Unnamed documents helge <w4h@nurfuerspam.de> - 2015-05-11 11:03 +0000
Re: Unnamed documents William Unruh <unruh@invalid.ca> - 2015-05-11 19:45 +0000
Re: Unnamed documents The Natural Philosopher <tnp@invalid.invalid> - 2015-05-11 21:10 +0100
Re: Unnamed documents Tim Watts <tw_usenet@dionic.net> - 2015-05-11 21:34 +0100
Re: Unnamed documents Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-05-12 01:25 +0000
Re: Unnamed documents Tim Watts <tw_usenet@dionic.net> - 2015-05-11 11:21 +0100
Re: Unnamed documents "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2015-05-11 22:42 +0200
Re: Unnamed documents Curt <curty@free.fr> - 2015-05-16 18:23 +0000
| From | helge <w4h@nurfuerspam.de> |
|---|---|
| Date | 2015-05-11 10:10 +0000 |
| Subject | Unnamed documents |
| Message-ID | <mipv68$got$1@news.albasani.net> |
Hi NG! sudo 'ls -al' in my home-directory lists 2 files 'Unnamed document 1.txt~'. I want to delete them, but how? Vy 73! Helge -- http://dj1wm[DOT]darc[AT]de
[toc] | [next] | [standalone]
| From | Richard Kettlewell <rjk@greenend.org.uk> |
|---|---|
| Date | 2015-05-11 11:17 +0100 |
| Message-ID | <wwvzj5b770g.fsf@l1AntVDjLrnP7Td3DQJ8ynzIq3lJMueXf87AxnpFoA.invalid> |
| In reply to | #14749 |
helge <w4h@nurfuerspam.de> writes: > sudo 'ls -al' in my home-directory lists You don’t need sudo to list your own home directory. > 2 files 'Unnamed document 1.txt~'. > I want to delete them, but how? You say there are two files but only give one name. At any rate to delete that one: rm 'Unnamed document 1.txt~' -- http://www.greenend.org.uk/rjk/
[toc] | [prev] | [next] | [standalone]
| From | helge <w4h@nurfuerspam.de> |
|---|---|
| Date | 2015-05-11 11:03 +0000 |
| Message-ID | <miq29o$mf3$1@news.albasani.net> |
| In reply to | #14750 |
> helge <w4h@nurfuerspam.de> writes: >> sudo 'ls -al' in my home-directory lists > > You don’t need sudo to list your own home directory. > >> 2 files 'Unnamed document 1.txt~'. >> I want to delete them, but how? > > You say there are two files but only give one name. At any rate to > delete that one: > > rm 'Unnamed document 1.txt~' Well, the other file is named 'Unnamed document 1.txt~~' Anyway it worked! Thanks.
[toc] | [prev] | [next] | [standalone]
| From | William Unruh <unruh@invalid.ca> |
|---|---|
| Date | 2015-05-11 19:45 +0000 |
| Message-ID | <mir0t9$miu$1@dont-email.me> |
| In reply to | #14752 |
On 2015-05-11, helge <w4h@nurfuerspam.de> wrote: >> helge <w4h@nurfuerspam.de> writes: >>> sudo 'ls -al' in my home-directory lists >> >> You don???t need sudo to list your own home directory. >> >>> 2 files 'Unnamed document 1.txt~'. >>> I want to delete them, but how? >> >> You say there are two files but only give one name. At any rate to >> delete that one: >> >> rm 'Unnamed document 1.txt~' > > Well, the other file is named 'Unnamed document 1.txt~~' > Anyway it worked! Thanks. The lunacy of overloading the blank, so it can mean either just another character, or a word terminator is a real pain. You have to escape the blank to tell the system to treat it as a character rather than as a terminator. That can be done by quotes (single or double) or by the escape character, which is usually the backslash on Linux. Thus 'Unnamed document 1.txt~~' "Unnamed document 1.txt~~" Unnamed\ document\ 1.txt~~ Or combinations 'Unnamed doc'ument\ 1.txt~~ will work. In all cases bash treats the spaces as characters, not terminators. (Yes, it is the shell that does that). Note that you could also tell the system to use some other character as the word terminator if you wanted, but it is not advisable except in unusual circunstances. (Not that I can tell you right now how to do that) Eg in the above you could make : bash's word terminator, and then the spaces would be fine. > > >
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2015-05-11 21:10 +0100 |
| Message-ID | <mir2ce$jsv$1@news.albasani.net> |
| In reply to | #14755 |
On 11/05/15 20:45, William Unruh wrote: > On 2015-05-11, helge <w4h@nurfuerspam.de> wrote: >>> helge <w4h@nurfuerspam.de> writes: >>>> sudo 'ls -al' in my home-directory lists >>> >>> You don???t need sudo to list your own home directory. >>> >>>> 2 files 'Unnamed document 1.txt~'. >>>> I want to delete them, but how? >>> >>> You say there are two files but only give one name. At any rate to >>> delete that one: >>> >>> rm 'Unnamed document 1.txt~' >> >> Well, the other file is named 'Unnamed document 1.txt~~' >> Anyway it worked! Thanks. > > The lunacy of overloading the blank, so it can mean either just another > character, or a word terminator is a real pain. You have to escape the > blank to tell the system to treat it as a character rather than as a > terminator. That can be done by quotes (single or double) or by the > escape character, which is usually the backslash on Linux. Thus > 'Unnamed document 1.txt~~' > "Unnamed document 1.txt~~" > Unnamed\ document\ 1.txt~~ > > Or combinations > 'Unnamed doc'ument\ 1.txt~~ > > will work. In all cases bash treats the spaces as characters, not > terminators. (Yes, it is the shell that does that). Note that you could > also tell the system to use some other character as the word terminator > if you wanted, but it is not advisable except in unusual circunstances. > (Not that I can tell you right now how to do that) > > Eg in the above you could make : bash's word terminator, and then the > spaces would be fine. > rm Unnamed* will also do what you want if ls -l Unnamed* reveals only files you want to delete. > >> >> >> -- Everything you read in newspapers is absolutely true, except for the rare story of which you happen to have first-hand knowledge. – Erwin Knoll
[toc] | [prev] | [next] | [standalone]
| From | Tim Watts <tw_usenet@dionic.net> |
|---|---|
| Date | 2015-05-11 21:34 +0100 |
| Message-ID | <3bg72c-vd5.ln1@squidward.dionic.net> |
| In reply to | #14755 |
On 11/05/15 20:45, William Unruh wrote: > > will work. In all cases bash treats the spaces as characters, not > terminators. (Yes, it is the shell that does that). Note that you could > also tell the system to use some other character as the word terminator > if you wanted, but it is not advisable except in unusual circunstances. > (Not that I can tell you right now how to do that) > > Eg in the above you could make : bash's word terminator, and then the > spaces would be fine. > Hmm rm:-rf:somefile:someotherfile Or we could just accept that whitespace in filenames are the work of Satan and remember what the underscore character is for ;-> Essentially it's all Bill Gates' fault...
[toc] | [prev] | [next] | [standalone]
| From | Charlie Gibbs <cgibbs@kltpzyxm.invalid> |
|---|---|
| Date | 2015-05-12 01:25 +0000 |
| Message-ID | <mirkr4011t0@news4.newsguy.com> |
| In reply to | #14757 |
On 2015-05-11, Tim Watts <tw_usenet@dionic.net> wrote: > On 11/05/15 20:45, William Unruh wrote: > >> will work. In all cases bash treats the spaces as characters, not >> terminators. (Yes, it is the shell that does that). Note that you could >> also tell the system to use some other character as the word terminator >> if you wanted, but it is not advisable except in unusual circunstances. >> (Not that I can tell you right now how to do that) >> >> Eg in the above you could make : bash's word terminator, and then the >> spaces would be fine. > > Hmm > > rm:-rf:somefile:someotherfile > > Or we could just accept that whitespace in filenames are the work of > Satan and remember what the underscore character is for ;-> > > Essentially it's all Bill Gates' fault... Ah, but his crime is overloading the backslash. One of his crimes, anyway. -- /~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs) \ / I'm really at ac.dekanfrus if you read it the right way. X Top-posted messages will probably be ignored. See RFC1855. / \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
[toc] | [prev] | [next] | [standalone]
| From | Tim Watts <tw_usenet@dionic.net> |
|---|---|
| Date | 2015-05-11 11:21 +0100 |
| Message-ID | <kdc62c-6m6.ln1@squidward.dionic.net> |
| In reply to | #14749 |
On 11/05/15 11:10, helge wrote: > Hi NG! > > sudo 'ls -al' in my home-directory lists > 2 files 'Unnamed document 1.txt~'. > I want to delete them, but how? > > Vy 73! Helge > rm 'Unnamed document 1.txt~'
[toc] | [prev] | [next] | [standalone]
| From | "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> |
|---|---|
| Date | 2015-05-11 22:42 +0200 |
| Message-ID | <b07a8ffc3e5ef1e4c3254b5a7f9cd55f@remailer.privacy.at> |
| In reply to | #14751 |
Tim Watts <tw_use...@dionic.net> [TW]: TW> rm 'Unnamed document 1.txt~' For files with weird, non-printable or even invisible characters in their name a curses-based file manager (eg. mc, fd) might prove helpful. For hard-core console users, or when a file manager is not available: find /PATH/TO/DIR -type f -print0|xargs -0 --max-args=1 --interactive rm
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2015-05-16 18:23 +0000 |
| Message-ID | <slrnmlf2pa.476.curty@einstein.electron.org> |
| In reply to | #14749 |
On 2015-05-11, helge <w4h@nurfuerspam.de> wrote: > Hi NG! > > sudo 'ls -al' in my home-directory lists > 2 files 'Unnamed document 1.txt~'. > I want to delete them, but how? I find that tab completion is convenient for handling files with spaces in them (bash shell); so 'rm Unnamed<tab>' (for instance) will result in rm Unnamed\ document\ 1.txt and if you're in agreement with that, just press enter and the file will be removed without further ado. Was that the question? > Vy 73! Helge --
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.linux.misc
csiph-web