The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reading a file and writing the file name to a param file. thebeginer UNIX for Advanced & Expert Users 1 10-05-2007 01:38 PM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 01:25 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Dec 2004
Posts: 19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
File ?

Very new user with a dumb question. While performing ls command I found some files in my directory that look like this:

#filename#

What does this mean. I cannot open with vi, cat, head, nor can I delete it with rm. Can someone educate me please, and how to fix?

THX

Dereck
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-29-2004
seg seg is online now
Registered User
 

Join Date: Aug 2003
Posts: 58
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
I've never seen anything like that. My first guess is if you need to move/delete/edit them use the escape character '\', perhaps mv ./\#filename\# ./filename
That's just my first thought without testing.

-Seg
Reply With Quote
  #3 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Dec 2004
Posts: 19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Thanks, but that did not work. If it helps I know how it was created. I started making a new text file using the "vi" command and the terminal window was closed before saving the file and quiting. Now it just sits in limbo, and I do not know how to delete or rename it so I can work with it.
Reply With Quote
  #4 (permalink)  
Old 12-29-2004
seg seg is online now
Registered User
 

Join Date: Aug 2003
Posts: 58
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Assuming the bad files are not in a critical directory such as /etc /root ...

Try moving everything you can out of the directory to a safe spot, then go back to the directory with the bad files and try rm -rf ./*
If that does not work, mv the directory to a new location, here's an example

the bad file is in /baddir/

mkdir /dir2
mv baddir /dir2
cd dir2

then:
rm -rf ./*


There is an appropriate way to delete the file itself, but I do not remember what it is outside my original post.

-Seg

edit: if it was left there by vi it's probably locked. I have not used vi in a long long time, if i recall correctly when the same thing happened to me i had to reenter vi and get vi to open the file, close it then it was gone. it's that kind of crap that sent me to pico in the first place.
Reply With Quote
  #5 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Dec 2004
Posts: 19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
I finnaly made things work. What I did was create a new directory called Dereck1. Changed directories "cd" to Dereck1, then:

cp ~/Dereck/* .

Went back to directory Dereck, rm -rf ./*
Then up one directory and rmdir Dereck

Never could make this work.
mkdir /Dereck1
mv Dereck /Dereck1

Kept getting message:
mv: cannot access Dereck1

Any clue what is wrong?

Looks like it should have worked from the command book, but it did not, beats me. Sure would have been easier.

Thanks for the help.
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 11:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102