LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell Script Does Not Exist (https://www.linuxquestions.org/questions/linux-newbie-8/shell-script-does-not-exist-891214/)

hitmen 07-11-2011 11:55 PM

Shell Script Does Not Exist
 
c@c-laptop:~$ locate /.bashrc
/etc/skel/.bashrc
/home/c/.bashrc
/root/.bashrc

I need to edit /home/c/.bashrc

However when I go to place> Home folders to go to /home/c , the file is not there.

What should I do to make the file appear so that I can edit it?

It is obviously a system file.

colucix 07-12-2011 12:03 AM

Files whose name starts with a dot are hidden! From a terminal you can do
Code:

ls -a
to show them. From a file manager there should be an option to show hidden files, as well. In any case from a terminal open your favorite text editor and you will find it, e.g. using vi
Code:

vi /home/c/.bashrc
Quote:

Originally Posted by hitmen (Post 4412239)
It is obviously a system file.

Not really. It is the user's configuration file for the bash shell. It is copied from /etc/skel/.bashrc whenever a user is created, but then it is a file owned by the user, that can be customized to suit the user's need.

hitmen 07-12-2011 12:31 AM

Hi

is there a graphical interface for this?

I cant seem to edit vi /home/c/.bashrc from command prompt.

hitmen 07-12-2011 12:57 AM

I dunno why nano works but vi does not work properly.

chrism01 07-12-2011 12:58 AM

start with cd'ing into the dir, then do
Code:

ls -al .bashrc
and post result

colucix 07-12-2011 01:01 AM

What does "vi does not work properly" mean? Any error message? If you need a GUI editor, try gedit (if running GNOME) or kwrite (if running KDE). They should be installed by default.

hitmen 07-12-2011 01:14 AM

-rw-r--r-- 1 c c 3007 2011-07-12 21:56 .bashrc


Well I cant type words using the vi editor.
Is there any difference between vi and nano?

This is because this is the first time I am using vi.
Is it different from any text editor?

colucix 07-12-2011 01:20 AM

Quote:

Originally Posted by hitmen (Post 4412305)
-rw-r--r-- 1 c c 3007 2011-07-12 21:56 .bashrc


Well I cant type words using the vi editor.
Is there any difference between vi and nano?

This is because this is the first time I am using vi.
Is it different from any text editor?

Yes. In vi you have to switch between COMMAND mode and INSERT mode. Whenever you type a i (insert), a (append), o (append new line) command you automatically switch into INSERT mode, then press Esc to exit and return to COMMAND mode. Look at vi documentation to learn about its commands. Indeed it requires a bit of practice and patience.

grail 07-12-2011 01:25 AM

Yes it is different and has 2 different modes. When you start it you are in command mode and as the name suggests it allows you to send commands
to the editor, some of which take you to the second mode which is insert mode and this allows you to enter text into the file.

Just type - vi tutorial - into google and you will find a plethora of information. Should you wish to continue with it I would also suggest installing vim
which is vi improved and is a little more user friendly.

bsat 07-13-2011 02:26 AM

or just open a terminal and type vimtutor its a pretty good tutorial on vi.

nooneknowme 07-13-2011 02:36 AM

If you want to see the files via the GUI .. There is an option in Nautilus-> View -> Show Hidden Files

catkin 07-13-2011 02:42 AM

Quote:

Originally Posted by nooneknowme (Post 4413502)
If you want to see the files via the GUI .. There is an option in Nautilus-> View -> Show Hidden Files

Shortcut on Thunar file manager (probably Nautilus too): Ctrl+H

nooneknowme 07-13-2011 02:46 AM

Quote:

Originally Posted by catkin (Post 4413506)
Shortcut on Thunar file manager (probably Nautilus too): Ctrl+H

yes Ctrl+H is the shortcut in Nautilus too

i92guboj 07-13-2011 03:12 AM

First, ~/.bashrc has not to be in there, just create it yourself.

Second, any editor will do, just pick one that you like, it doesn't matter if it's GUI or text based as long as it's a plain text editor and not a word processor.

chrism01 07-13-2011 07:29 PM

Actually, according to post#7, it's there ...


All times are GMT -5. The time now is 10:37 AM.