Showing posts with label Files. Show all posts
Showing posts with label Files. Show all posts

Monday, November 06, 2006

Deleting those cranky files

This one is a basic tip although I get to see many people struggling when it comes to handling these files.

File

"file like this"

Delete using

rm "file like this"

File

"-filelikethis"

Delete using

rm -- -filelikethis

or

rm ./-filelikethis

Sunday, November 05, 2006

Listing Open Files in Linux

Did you ever try out finding what files are currently being used on your Linux system?

In Linux, you do that by using a command called lsof (means list open files)

But then, just using lsof would give you far too many results. lsof can be used with the following options

To list files open by the user

lsof -u techflock

List the users of a particular file

lsof /usr/bin/gnome-keyring-daemon

List the processes of a particular program

lsof -c sshd