Sponsored Content
Operating Systems OS X (Apple) A system deletes my .bashrc file Post 302977039 by scrutinizerix on Monday 11th of July 2016 12:46:46 PM
Old 07-11-2016
OK, so to set it up I'd like to admit I'm neither computer not programming, let alone UNIX, geek. I'm a dummy, hence all this confusion with used terminology etc. It's possibly that I may've misled myself and others, participating in this discussion, due to this reason, not just because I intended to, bear that in mind, please.

You wrote too much. Let me clear out some points:
1. I don't know exactly why and when did .bashrc disappear. Considering "deletion-reboot" connection it's just my guess based on my subject observations. Maybe the connection is not the case, maybe it's really a coincidence that I misinterpreted as a cause.

Further on
2.
Quote:
But, when you start a new terminal session, you don't need to type the command ./.bashrc if bash is the shell running in that terminal session. When bash is invoked as a login shell, it runs .bashrc in your home directory as part of its initialization steps.
Really? Didn't have a clue of it. However I may misinterpret that statement once again but from "Learning UNIX for Mac OS X users" by Kevin Scoglund (by Lynda.com) I got impression that for commands from .bashrc to take effect you have to execute this file by running
Code:
source .bashrc

when in home directory (or
Code:
. ./.bashrc

- I think I foozled with the syntax in my last post considering this command, so stand corrected in this one). So, instead of running it multiple times when I launch Terminal or open its new window I just set it in Terminal Preferences to run it on bash shell's startup (see the screenshot - are we talking about the same thing?). It used to work - until it has gone.

3. I didn't execute in all my consciousness and right state of mind neither
Code:
rm -f

nor
Code:
rm

towards .bashrc file, that's for sure.

4. The main thing is that due to some unknown reasons the file got erased. I don't have a slightest explanation of this fact, I do however recall that some time ago I had a similar issue of unexpected deliberate erase (though I DON'T REMEMBER if it was the first occurrence of something deleting .bashrc or another file) because I copied and wrote down a Console's log referring to some pbs process.

The message was:

pbs[4781]: While watching paths {("/Users/iljashebalin/Library/")}, we got a change in path /Users/iljashebalin/Library/

Again, it's not my claim, rather my supposition that maybe something alike had hand in this case.
A system deletes my .bashrc file-shell-setuppng

Last edited by scrutinizerix; 07-11-2016 at 01:57 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

.bashrc file is an initialization file run by each interactive invocation

I search the web and found the following statements ..... The /etc/profile file is a system wide initialization script which is run at login time for each user, while .profile is the users own login initialization. The .bashrc file is an initialization file run by each interactive invocation... (1 Reply)
Discussion started by: cy163
1 Replies

2. Shell Programming and Scripting

Can I modify the .bashrc file instead of .profile file to customize my login?

Hello, I got this question which tells me to customize my login script. Some people in the forums suggested to modify the .profile file in my home directory. I did so, but none of my customizations show up when I open the terminal after. So, I tried to modify other files in my home directory,... (1 Reply)
Discussion started by: Hyunkel
1 Replies

3. Shell Programming and Scripting

how do i look for my .bashrc file

hi i am using cygwin and would like to modify my .bashrc file. How can search to find where it is? I have looked at multiple bashrc file in /etc but none of them seemed to work..thanks (12 Replies)
Discussion started by: npatwardhan
12 Replies

4. Shell Programming and Scripting

.bashrc file

Hi experts, I am using bash shell and I cant find any .bashrc file in my home dir. Can anybody please help me out here.... If .bashrc file is not there, from where my shell config operates? Also I want to set my prompt like... $ Please advice. (5 Replies)
Discussion started by: gentleDean
5 Replies

5. Shell Programming and Scripting

A script that deletes files.

I want to write a script that deletes files inside the dir. However, the script should also allow the user to confirm by pressing (d) key before deleting files.. #!/bin/bash for file in $1/* do size='ls -l $file | cut -f 5 -d " "' name='ls -l $file | cut -f 9 -d " "' ... (1 Reply)
Discussion started by: herberwz
1 Replies

6. Shell Programming and Scripting

Why sed command deletes last line in a file if no carriage return?

Hi I am using sed command to make SCORE=somevalue to SCORE=blank in a file. Please see the attached lastline.txt file. After executing the below command on the file, it removes the last line. cat lastline.txt | sed 's/SCORE=.*$/SCORE=/g' > newfile.txt Why does sed command remove the... (3 Replies)
Discussion started by: ashok.k
3 Replies

7. Slackware

Thunderbird 3.1.9 deletes from drafts

I am using Tbird as it came with Slackware 13.37 and everytime I send something I get a message 1 or 2 drafts deleted. Should it be doing that? If not has this been reported ? How can I find out if it was reported? I have no drafts to delete. (2 Replies)
Discussion started by: slak0
2 Replies

8. Solaris

rm -rf not able deletes file but not the directory

i am trying to remove a directory using rm -rf command but its not getting removed.. it doesnt throw any error also.. i am logging as the owner of the dir and removing it but still no luck.. i am able remove a file but not a directory. i am using solaris 10 (12 Replies)
Discussion started by: chidori
12 Replies

9. UNIX for Dummies Questions & Answers

Bashrc File - Conditional Command Execution?

Hello All, I was wondering if there is a way to execute a command in my ".bashrc" file based on how I logged into the PC? I was thinking maybe there is a way to check how the user (*myself) logged in, maybe somehow with the who command along with something else, but I'm not sure... I know I... (7 Replies)
Discussion started by: mrm5102
7 Replies
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy