Create same file name to directory name without dropping it

Hi,

Under '/home' directory, there is one file called 'maddy'.Usually there used to be directories under /home directory.

 
[root@server06 home]# ls -alrt
total 132
drwx------  2 hcladmin sys       4096 May 30 10:54 admin
drwxr-xr-x 29 root     root      4096 Aug 27 03:54 ..
drwx------  2 v6admin  dba       4096 Oct 21 13:58 veeraadmin
drwx------  3 cmderoot cmderoot  4096 Oct 22 10:43 cmderoot
-rw-r-----  1 root     root     99314 Nov  7 06:59 maddy
drwxr-xr-x  5 v6admin  root      4096 Nov  7 06:59 .
 

How to change this file 'maddy' to directory without dropping it ?
Earlier 'maddy' file was directory not sure who has change it to a file now.How to find those informations?

Previously i was using this /home/maddy direcotory to move a files that exist in /oracle directory to /home/maddy since i do not have permission to move a file directly from /oracle to local drive (windows).

OS -- Linux 2.6

Regards,
Maddy

I dont think you can change a file to a directory of vice versa.
you can create a directory with name 'maddy' and move the file into that with the below code

mv maddy maddy_01 && mkdir maddy && mv maddy_01 maddy/maddy
1 Like

Please check if are able to open the file and it's content, if it looks familiar to you. Start basic investigation from there.

1 Like

Thanks Srini and Saps for your suggestions.

How to find out who has made those changes ?

Regards,
Maddy