30

I wanted to add classpath to my JDK. While searching a way to do it I noticed everyone open .profile file using terminal. But when I want to open and edit it with a text editor I couldn't see that file in Home folder.

Can someone tell me why is this. And also if possible how can I access .profile in home folder the GUI way.

pomsky
  • 70,557
samsri
  • 413

3 Answers3

45

GUI way to show a hidden file or folder

Hidden files and folder have names that start with a . (dot character). To toggle show/hide hidden files or folders use the keyboard shortcut Ctrl+H.

karel
  • 122,292
  • 133
  • 301
  • 332
18

in Linux and Unix systems, the files starting with . (a dot) are hidden files. To see them with the ls command, add -a or -A at your ls.

ls -a /path/to/dir

or

ls -A ~

From the manual man ls:

   -a, --all
          do not ignore entries starting with .

   -A, --almost-all
          do not list implied . and ..
Wilf
  • 30,732
fromnaboo
  • 3,756
6

The reason you can't "see" .profile" is because the ls command does not display file and directory names starting with . - this is the original device for "hiding" files in Unix.

You can still edit .profile by typing emacs .profile (or whatever editor you wish to use.)

And, you can "see" all your files by typing ls -al which asks for the "long form" (more informative) output for all specified directory or file arguments.

Wilf
  • 30,732
user38666
  • 101