 | Junior Member with 18 posts. | | Join Date: Aug 2004 Experience: Beginner | | Deleting a file Hi
I need a tip to delete the file.
# uname -a
SunOS yakdev2 5.10 Generic sun4u sparc SUNW,Sun-Fire-V240
This is the file to be deleted.
-rw-r--r-- 1 testuser sysadmin 758 Apr 19 15:06 Shortcut to top-3.6alpha10pre.tar.gz.lnk
# rm Shortcut to top-3.6alpha10pre.tar.gz.lnk
Shortcut: No such file or directory
to: No such file or directory
top-3.6alpha10pre.tar.gz.lnk: No such file or directory
Thanks in advance | | Senior Member with 435 posts. | | Join Date: Nov 2004 Location: Canada | | looks like a leftover from an uninstall ...try safe mode or reinstall the program and delete as a whole. | | Senior Member with 1,246 posts. | | Join Date: Sep 2003 Experience: Linux~su | | rm "Shortcut to top-3.6alpha10pre.tar.gz.lnk"
will probably be the easiest
you could also probably do a rm Shortcut (tab) it should autocomplete assuming its the only one in the folder | | Distinguished Member with 14,984 posts. | | Join Date: Apr 2003 Location: 1265 Lombardi Ave Experience: IIAHYAYCESA,YAADA! | | Quote: |
Originally Posted by somefellow looks like a leftover from an uninstall ...try safe mode or reinstall the program and delete as a whole. | I just laugh when people post Windows Solutions in the Linux Forum.
Tsunam has it on the head. Just start typing and hit the tab to auto complete the filename or put the whole filename in quotes. If you want to use the spaces you need to use the escape character \ or put the whole filename in quotes.
rm Shortcut\ to\ top-3.6alpha10pre.tar.gz.lnk | | Distinguished Member with 2,051 posts. | | Join Date: Nov 2002 Location: Alberta, Canada Experience: Windows: Decent. Unix/Linux: Advanced +1 | | Yeah. It's easier when the question is windows related, because then it can be moved! | | Senior Member with 1,410 posts. | | | | You can delete any file with funky characters in its name by using the command: rm -i filespec, where filespec is an expression that includes the file you want to delete. For your example, you might try: rm -i Short* (or similar). Don't know what the expression should be? Try rm -i *, and you will be prompted for each filename in the current directory ... simply answer "Y" (without the quotes) when the filename(s) appear that you want to delete.
As Tsunam mentioned, auto-complete does pretty much the same thing. Caveat: not every shell features auto-complete, and it's possible to have it turned off.
Hope this helps.
__________________ The slowest component still sits at the keyboard. | | Senior Member with 435 posts. | | Join Date: Nov 2004 Location: Canada | | sorry guys , my bad .  didn`t even look at the title . | | Junior Member with 18 posts. | | Join Date: Aug 2004 Experience: Beginner | | Deleting a file Hi all
Very interesting tips and I have deleted the file using
rm "Shortcut to top-3.6alpha10pre.tar.gz.lnk"
I want to try with other commands and the file is deleted by then.
I appreciate one and all for their valued support.
Thanks | | Senior Member with 1,246 posts. | | Join Date: Sep 2003 Experience: Linux~su | | Added note about -i, it can save your butt from doing a rm -rf /etc instead of /home/user/etc/
Which as everyone here will say, is a very bad thing to do! | | Senior Member with 1,246 posts. | | Join Date: Sep 2003 Experience: Linux~su |
02-Jun-2005, 04:49 PM
#10 | | | | Senior Member with 1,962 posts. | | Join Date: Aug 2002 Location: Back East,Way Back East |
02-Jun-2005, 07:17 PM
#11 | Quote: |
Originally Posted by tsunam Added note about -i, it can save your butt from doing a rm -rf /etc instead of /home/user/etc/
Which as everyone here will say, is a very bad thing to do! | Yes. You can never say that often enough. | | Distinguished Member with 2,051 posts. | | Join Date: Nov 2002 Location: Alberta, Canada Experience: Windows: Decent. Unix/Linux: Advanced +1 |
05-Jun-2005, 05:19 PM
#12 | Which is why whenever I set up a newbie running CLI, the first thing that goes into bashrc, or profile ( i can never remember which) is alias rm='rm -i' |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
|
Smart Search
| Find your solution! | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:52 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|