Problem with deleting .dmp file

Hi, everybody!
I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909*
This is a part of my folder contents in unix before deleting

drwxrwxr-x 2 oracle dba 1024 Sep 15 10:49 .
drwxr-xrwx 6 oracle dba 1024 Dec 6 2010 ..
-rw-r--r-- 1 oracle dba 1005568000 Sep 12 08:38 XX_20110909.dmp
-rw-r--r-- 1 oracle dba 81120256 Sep 12 08:42 YY_20110909.dmp
-rw-r--r-- 1 oracle dba 580651008 Sep 14 08:32 XX_20110914.dmp
-rw-r--r-- 1 oracle dba 580096000 Sep 15 10:51 YY_20110915.dmp
-rw------- 1 oracle dba 522096 Nov 5 2010 core
oracle@ZZ-dbux:/oracle/exp/myfolder$ rm * 909*
rm: 909* non-existent

Then I wrote ll command and I found only these rows

drwxrwxr-x 2 oracle dba 1024 Sep 15 10:49 .
drwxr-xrwx 6 oracle dba 1024 Dec 6 2010 ..

I have no idea what is the role of the last row. What do it?

Vietnam Software Outsourcing

. is a special folder meaning 'current directory'.
.. is a special folder meaning 'previous directory'.

They are hardcoded, and exist everywhere it makes sense for them to do so (.. can't exist in /, of course.)

1 Like

@corona:

 .. is present under root,  however .. under root points to the current directory itself. Any specific reason why .. is displayed under root? \( I saw this behavior in RedHat Linux and AIX\).

You have deleted all the files in the current directory.

works like this

which deleted all files from current dir and then

which didn't found any file in the directory so u got an error message.

are the links to present directory (.) and the parent directory (..) which will be available in each and all directories in unix.

Cheers,
Sudeep

Advice:
Until you get used to the commands, use rm -i at the command line and try to match as much of the filename as possible.
The rm -i will prompt you to ask whether you want to delete the each file.

rm -i *909.dmp

The fact that you accidentally deleted all files in the directory is explained by @sudeep.id above.