UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 31st, 2005, 03:06 PM
chrs0302 chrs0302 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 43 chrs0302 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 30 sec
Reputation Power: 4
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

Reply With Quote
  #2  
Old May 31st, 2005, 04:40 PM
codergeek42's Avatar
codergeek42 codergeek42 is offline
[Insert clever comment here.]
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jul 2003
Location: Anaheim, CA (USA)
Posts: 6,438 codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)codergeek42 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 39542 Folding Title: Starter FolderFolding Points: 39542 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 6 Days 11 h 48 m 38 sec
Reputation Power: 1158
Send a message via ICQ to codergeek42 Send a message via AIM to codergeek42 Send a message via Yahoo to codergeek42 Send a message via Google Talk to codergeek42
You've got a couple different options.
  • You can escape the spaces with a backlslash, like so:
    Code:
    # rm Shortcut\ to\ top-3.6alpha10pre.tar.gz.lnk
    or...
  • You can enclose the filename in quotes:
    Code:
    # rm "Shortcut to top-3.6alpha10pre.tar.gz.lnk"
__________________
~~ Peter ~~
( My Blog: It's exactly like normal nerdiness, but completely different. ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key )

Reply With Quote
  #3  
Old June 2nd, 2005, 08:44 AM
chrs0302 chrs0302 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 43 chrs0302 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 30 sec
Reputation Power: 4
Hi codergeek42

Great. It worked like this.

bash-3.00$ rm "Shortcut to top-3.6alpha10pre.tar.gz.lnk"

Thanks for the help.

Reply With Quote
  #4  
Old June 3rd, 2005, 12:33 PM
gruntz gruntz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 53 gruntz User rank is Private First Class (20 - 50 Reputation Level)gruntz User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 22 h 39 m 25 sec
Reputation Power: 5
Quote:
Originally Posted by chrs0302
Hi codergeek42

Great. It worked like this.

bash-3.00$ rm "Shortcut to top-3.6alpha10pre.tar.gz.lnk"

Thanks for the help.


Just to add...you can also delete using i-node (ls -i) to get I node then "find . -i# -exec rm|mv|whatever {};"

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Deleting a file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT