Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition password problem router slow software sound trojan usb video virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Deleting a file


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
chrs0302's Avatar
Junior Member with 18 posts.
 
Join Date: Aug 2004
Experience: Beginner
31-May-2005, 04:09 PM #1
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
somefellow's Avatar
Senior Member with 435 posts.
 
Join Date: Nov 2004
Location: Canada
31-May-2005, 04:22 PM #2
looks like a leftover from an uninstall ...try safe mode or reinstall the program and delete as a whole.
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
31-May-2005, 04:30 PM #3
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
Squashman's Avatar
Distinguished Member with 12,689 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
31-May-2005, 06:33 PM #4
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
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - Windows Shell/User
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
31-May-2005, 06:46 PM #5
Yeah. It's easier when the question is windows related, because then it can be moved!
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
01-Jun-2005, 12:47 AM #6
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.
somefellow's Avatar
Senior Member with 435 posts.
 
Join Date: Nov 2004
Location: Canada
01-Jun-2005, 04:10 PM #7
sorry guys , my bad . didn`t even look at the title .
chrs0302's Avatar
Junior Member with 18 posts.
 
Join Date: Aug 2004
Experience: Beginner
02-Jun-2005, 09:51 AM #8
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
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
02-Jun-2005, 04:48 PM #9
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!
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
02-Jun-2005, 04:49 PM #10
bah stupid double post!
lynch's Avatar
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.
Whiteskin's Avatar
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'
Closed Thread

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.


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 help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:10 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.