Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

how to create a file with .dat extension in ubuntu 12.04

Writer Matthew Martinez

I am new to Ubuntu. I have been using Ubuntu 12.04 for the past few weeks. My question is, just like we can use notepad in Windows to create files with .dat extension, how do i create such a file in Ubuntu? Your help will be highly appreciated.

1 Answer

There is multitude of ways, as you can write text files with any extension you want.

With gedit text editor you can save the file as testfile.dat

Here's one way in command line: echo "TEST" > testfile.dat

Another way in command line to create multiple files with same content: echo "TEST" | tee {one,two,three}.dat

You can even rename an existing file to .dat file simply by using mv sourcefile sourcefile.dat

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy