Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-11-10 03:46:03
Point:500 Replies:8 POST_ID:828784USER_ID:11059
Topic:
Linux;PHP Scripting Language;Apache Web Server
Somehow, I found on my root directory in which it
has direcotry named ec2-user / that I want
to delete it. But it can not do that by
rm -rf ec2-user
or
rm -rf "ec-user "
Probably the directory is created by my wrong script with " " putting to the directory
name.
How I can I delete it
Pleaea advise
Duncan
has direcotry named ec2-user / that I want
to delete it. But it can not do that by
rm -rf ec2-user
or
rm -rf "ec-user "
Probably the directory is created by my wrong script with " " putting to the directory
name.
How I can I delete it
Pleaea advise
Duncan
Author: duncanb7 replied at 2024-11-10 05:01:22
Just want to reminder you the thread is closed so just worry you
did not see it. Anyway Thanks for your help
did not see it. Anyway Thanks for your help
Expert: woolmilkporc replied at 2024-11-10 04:49:44
I just wanted to help. Sorry for bothering you.
Author: duncanb7 replied at 2024-11-10 04:47:37
The thread is already closed
Expert: woolmilkporc replied at 2024-11-10 04:41:57
Sure.
But why the extra effort of renaming before deleting when a single step is sufficient, just by using single quotes?
But why the extra effort of renaming before deleting when a single step is sufficient, just by using single quotes?
Author: duncanb7 replied at 2024-11-10 04:25:26
if it can be renamed as normal direcotry name , it is of course that can be deleted
Expert: woolmilkporc replied at 2024-11-10 04:13:15
Just using single quotes would have been sufficient:
rm -rf 'ec-user '
The link you found deals with renaming, not removing (yet it helps).
Renaming can be done with single quotes as well:
mv 'ec-user ' ec-user
wmp
rm -rf 'ec-user '
The link you found deals with renaming, not removing (yet it helps).
Renaming can be done with single quotes as well:
mv 'ec-user ' ec-user
wmp
Author: duncanb7 replied at 2024-11-10 03:49:51
it is solved suddenly on my command with rename $'
' "" *
http://unix.stackexchange.com/questions/60779/how-do-i-remove-carriage-returns-from-directory-names
Duncan
http://unix.stackexchange.com/questions/60779/how-do-i-remove-carriage-returns-from-directory-names
Duncan
Accepted Solution
Author: duncanb7 replied at 2024-11-10 03:48:56
Finally solved it by first rename it
rename $' ' '' *
rename $' ' '' *