The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics 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 05: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 05:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-29-2004
dereckbc dereckbc is offline
Registered User
  
 

Join Date: Dec 2004
Posts: 19
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
  #2 (permalink)  
Old 12-29-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
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
  #3 (permalink)  
Old 12-29-2004
dereckbc dereckbc is offline
Registered User
  
 

Join Date: Dec 2004
Posts: 19
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.
  #4 (permalink)  
Old 12-29-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
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.
  #5 (permalink)  
Old 12-29-2004
dereckbc dereckbc is offline
Registered User
  
 

Join Date: Dec 2004
Posts: 19
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.
  #6 (permalink)  
Old 12-29-2004
seg seg is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2003
Posts: 260
No idea why it didnt work, but it's probably something simple. In any case I'm glad you got it fixed.

-Seg
  #7 (permalink)  
Old 12-29-2004
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
i did some thing like this ...
Enclose the file with "

It worked for me ; It should work for you toooo ....


$ cat > "#filename#"
thi is filename
$ cat "#filename#"
thi is filename
$ rm "#filename#"
Closed Thread

Bookmarks

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

BB 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 -4. The time now is 04:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0