LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 08-23-2006, 01:32 PM   #1
kabucek
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Rep: Reputation: 0
How to delete hidden files???


How to delete all files in directory including hidden files???
I know command
rm -rfv * <- will delete all files & show effect
but when i ls -a i've got still "." & ".." files
How to delete those files????
 
Old 08-23-2006, 01:52 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
You can't.

"." refers to "this directory", ".." refers to "the directory above this one" (hence cd ..). The only way to get rid of them is to delete the directory.
 
Old 08-23-2006, 01:57 PM   #3
kabucek
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Original Poster
Rep: Reputation: 0
how to delete system files ?? what if i don't wanna delete dir but only all files including system files and hidden files?????????
 
Old 08-23-2006, 02:01 PM   #4
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
you will get "." and "..", those are created with a directory. so if you want to remove that delete the dir itself
 
Old 08-23-2006, 08:47 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Just to reiterate, you cannot delete the "single dot" or "double dot" files. Those exist in every directory, and as already mentioned, they refer to "this directory itself" and the parent directory, respectively.

To delete any other system files, you can do so as root, however, I would advise against this, because depending on which system file(s) you delete, you could render your system unusable.
 
Old 08-27-2006, 11:21 PM   #6
dinojerm
Member
 
Registered: Apr 2004
Location: NJ,US
Distribution: Debian Sid
Posts: 33

Rep: Reputation: 15
By default, * expands to all files except hidden ones (beginning with .)
If you want to delete those hidden files (except for . and .. of course), you can use "rm .*" or "rm * .*"

Also, if you don't like the . and .. in the "ls -a" listing, you can use "ls -A" to list "almost-all" entries, which doesn't show . or ..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden files? sonic04002 Linux - Newbie 2 11-09-2005 01:48 PM
home directory files gone, hidden files remain Grasshopper Linux - Security 12 04-10-2005 08:23 PM
hidden files Alwyn Linux - Newbie 2 01-27-2005 12:20 AM
Hidden Files Alien18 Linux - Newbie 4 08-12-2004 09:38 PM
M$ CD w/ Hidden files???? trey85stang Linux - Newbie 3 05-04-2004 09:00 PM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration