Can i run ubuntu server on pentium 3 with 386mb of ram, as i need a basic file server to use at home. I have 3 computers and want to share files using a server on ubuntu, but i need to know what the minimum specs for it are.
Yes you can!
Ubuntu Server (CLI) minimum requirement.
See also Ubuntu Server Guide.
Server 12.04 will run on a Pentium III but will probably require a non-PAE kernel
As penreturn noted, your system is within the minimum specs for Server 12.04. But, note that 12.04 uses a PAE kernel by default which may not work on older systems, including yours.
To install Server 12.04 then, instead of using the i386 Server ISO, consider using the alternate i386 versions of the Xubuntu ISO. This is a text installer like the server, but includes the non-PAE kernel you will probably need. To install a CLI system, follow the steps and decline to install any "desktops".