General :: Why Can't .cshrc File Be Sourced Automatically

Mar 22, 2010

When I SSH to a certain Linux host, although my default shell is tcsh, the .cshrc file under my home directory is not sourced at all. I can't understand why this happens because from my understanding, if I'm using the tcsh, the .cshrc should be sourced anyway!

View 1 Replies


ADVERTISEMENT

General :: Get Path Of Sourced Bashrc File?

Feb 11, 2011

I want to assign the path of a sourced sub.bashrc file to an environment variable. E.g. if I type (or execute) from a known relative location

$ source ../../someDir/sub.bashrc

the sub.bashrc should set a variable like

export MyOwnLocation=/home/user1/unknownlocation/someDir

The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.

View 6 Replies View Related

General :: Cd Command Not Working In .cshrc File (bash Shell SUSE)?

May 29, 2011

Just trying to execute cd command in a .cshrc file (bash shell in SUSE Linux) it says."No such file or directory".Do you see any reasons for this

View 3 Replies View Related

Programming :: Trace The Actions That Are Performed By .cshrc File?

May 11, 2011

I need to trace the actions that are performed by my .cshrc file. Is there a command i can use to get a printout of this?

View 3 Replies View Related

General :: Profile Is Not Sourced On Startup?

Mar 1, 2011

I've recently installed virtualenv + virtualenvwrapper on Linux Mint 10 LXDE. For convenience I've added the standard WORKON_HOME settings to my ~/.profile

export WORKON_HOME=$HOME/Envs
source /usr/local/bin/virtualenvwrapper.sh

Then I've noticed that workon does not work after login, which means the above commands were not run. If I source ~/.profile then it works. I'm really not sure what could cause .profile not being run? I've checked and I don't have .bash_profile or .

View 1 Replies View Related

General :: Changing Working Directory Of Parent Script From 'sourced' Script?

Jun 8, 2011

I want to change working directory of my script by another script that has been included.

First script:

#!/bin/bash
pwd
source script2
pwd


Sedond script:

cd ..
pwd


View 5 Replies View Related

Fedora :: Setting PATHs In .cshrc Or .login

Mar 17, 2011

I'm a csh user. In my .cshrc or .login files, I'd like to add certain directories to my search PATH, but I'd first like to check if those directories are already in the search path before attempting to add them (so don't add the same directory twice). The following isn't working

Code:
if ( "${PATH}" !~ ~/bin ) then
setenv PATH "${PATH}:$HOME/bin"
endif

The problem is that the if-statements always evaluates to TRUE, meaning that ~/bin is always added to the path, even if it's already in the path.

What am I doing wrong in the above regulat expression, or alternatively, what's an easy way to accomplish the same thing?

View 3 Replies View Related

Fedora :: .bash_profile Is Sourced Rather Than .bashrc?

Jan 17, 2010

I am curious since "Run command as a login shell" is UNTICKED (I think for all new users) under Gnome Terminal -> Menu Bar -> Profiles -> Edit -> Title and Command , BUT .bash_profile is sourced. I thought .bashrc should be sourced instead ?

View 6 Replies View Related

General :: Automatically Rename A File In Samba?

Apr 15, 2011

Is there any method to automatically renaming a file when it is automatically put in a shared file in samba on debian ?

View 1 Replies View Related

General :: File Generated Automatically In RHEL 3.0?

Aug 2, 2010

I am running redhat ent linux 3.0 with oracle database . Recently , I got a problem,perhaps some temporary files are created automatically and occupied my HDD . But I cannot find which files are created autamatically . Is there any way or any os related log file so that I can find that which files are generated automatically OR how can I trace it from OS perspective? I have to check oracle related tmp,trace and log file in every folder.

View 1 Replies View Related

General :: Add Some String In The Head Of A New Created File Automatically In VIM?

Jun 25, 2010

To be specified,what I want to do is:

if I create xxx.php,#!/usr/bin/env php will be the first line of the file
if I create xxx.py,#!/usr/bin/env python will be added first.

View 4 Replies View Related

General :: Slackware 13 Automatically Lock - Ktorrent Start Automatically?

Jan 25, 2010

what to do for lock automatically slackware 13 if not used for n minutes ?What can i do to start automatically the ktorrent (a bittorrent program for linux) on system starts on slackware 13 ?

View 2 Replies View Related

Ubuntu :: Automatically Add A File To All New Users?

Jan 6, 2010

I am making a live CD and need to add a config file to all new users Home folder. This includes the Ubuntu user in the Live CD and New users created on install from the live CD.

Path would be: /home/ubuntu/config.file

View 3 Replies View Related

Debian :: Automatically Delete USB Flash And Copy New File

Aug 26, 2010

How can I automate the following: When I insert a flash drive into any of the available USB ports, some kind of script or software, must automatically mount it, delete everything off the flash drive, copy an audio file back to it and then automatically unmount the USB.Maybe I should setup some kind of Kiosk to use the above functionality - would that be easy?

View 2 Replies View Related

Fedora :: Generate Grub.conf File Automatically

Nov 16, 2009

After a kernel upgrade on my linux, my grub.conf become empty. How can I auto generate grub.conf file? I don't want to do it from scratch.

View 3 Replies View Related

OpenSUSE :: Dolphin Does Not Refresh File List Automatically?

Apr 23, 2011

I found that sometimes if I have opened file manager window (Dolphin) it does not refresh list. Example, if I already have Dolphin opened and then create file in Terminal - i need to press F5 (refresh) to see newly created file

View 9 Replies View Related

Ubuntu :: Run A Program Automatically When A File Appears In A Directory?

Jan 16, 2010

Does anyone know how I can make a program run automatically when a file appears in a particular directory? I have two computers, one to program the firmware on a microcontroller (command line only), and the other is my desktop machine running Ubuntu. I have an NFS share between the two. What I want is to be able to drop a new firmware load into the shared directory from the desktop, and have the other computer notice it and program the microcontroller with it. Right now I have to open an SSH session to the other computer, run the program manually, and then delete the file. I would like to automate all of that.

View 5 Replies View Related

Ubuntu :: Automatically File Sync On Laptop And Desktop?

May 3, 2010

I have updated to 10.04 on my desktop and on my Dell Inspiron 8200 laptop.What I would like to do is have the machines automatically synchronise working files as they change on each machine. I have found backup programs but am not sure if they will do what I need

View 3 Replies View Related

Ubuntu :: Nautilus - File Browser Does Not Refresh Automatically

Jun 19, 2010

I am using Ubuntu 10.04 x86_64 and have a problem that the file browser does not refresh automatically. This is what I notice. open a file browsercreate a folder or touch a new file from a terminal window.In the already opened file browser, I expect the new file or folder to show up on its own. It doesn't unless refresh button is pressed

View 3 Replies View Related

Ubuntu :: Directory Automatically Changing File Permissions

Jul 12, 2010

Is there a way to have a directory automatically change the permissions of a file that is written to it? I have a program which saves files to a directory, and gives those files read-only permissions to members in the group. This is a problem, because other users of my computer need to be able to edit these files. The directory itself has rw permissions for group members.

I guess what I am looking for is a way for the directory permissions to "override" the permissions the program is trying to save the files as. For example, if the directory has "rw" permissions for the group, then any file saved to it will automatically get the same permissions, regardless of what the program writing the file is trying to do.

View 3 Replies View Related

Software :: Automatically Respond Yes To Prompt To Copy Each File?

Apr 24, 2009

When using mput in smbclient (with recurse turned on) is there a way to automatically respond yes to the prompt to copy each file, or avoid the question all together?

View 2 Replies View Related

Ubuntu Servers :: Folder Permissions Automatically Set When Creating File

Apr 27, 2010

I have a little problem: I have a share folder on Ubuntu server: - Dump That folder is share with SAMBA and everyone can put files on it
My problem is the following: When someone create a folder, the folder permissions are automatically set with:
(let's take my username: Yann)

Owner: Yann
Group: Yann

Clearly that's wrong.. I want the Group to be auto set has "users" so everyone can access the folders on that share. Anyone know how to change this ? chmod and chown is getting a bit boring

View 2 Replies View Related

Ubuntu :: File Splitter Gui - DVD Burning Package That Splits Automatically?

Jan 9, 2011

To back up the virtual machine, the 9Gb file needs to be split in half so that they can burn it to DVD Using lxsplit is pretty simple for me, but these people are completely terrified of a terminal. Is there a simple gui front end for lxsplit so that I can just put an icon on the desktop for them? I've looked around with no success.

Or is there a DVD burning package that splits them automatically? Brasero is on there but it doesn't seem to have that capability. This would actually be the best option, as they wouldn't have to bother with a manual split at all.

View 1 Replies View Related

Ubuntu :: Text File Snot Opening Automatically With Gedit?

Apr 16, 2011

I have text files (.txt) to open with gedit but every time I try to open a text file it says:

Code:
Do you want to run "Installed programs", or display its contents?

And if I press Display it will open. How do I make it open automatically?

View 3 Replies View Related

Ubuntu Servers :: Crontab Or Other (script) To Automatically Replace File?

May 18, 2011

I have been searching for a few hours now trying to figure out the best way to have Ubuntu Server 8.10 copy and replace a file every week.

So for example:

File A (original file)
File B (replacement file)

I would want to copy File B from its location and replace File A each week automatically with out removing or destroying File B.

I've thought of doing a cron since I already have a job set for email piping. but I'm unsure of the best way to complete this task.

View 5 Replies View Related

Debian :: Mounting An FTP Address To My File System Automatically During Boot?

Apr 7, 2010

I'm having difficulties mounting an FTP address to my file system automatically during boot. After a bit of research I have discovered a package called curlftpfs, I've installed this package using aptitude and I had no errors.

I've successfully mounted an FTP address manually using curlftpfs at the command line and proved to myself that this is working as it should...However, I can't get this to mount automatically and I am receiving the following error during boot when I try and mount it through /etc/fstab...

Error connecting to ftp: Failed to connect to (IP address of server): Network is unreachable

My research indicates this package should be able to do this.

I'm still a learner when it comes to Linux, but could this be because TCP/IP services are not started at the time of mounting the filesystems? I've tried a continuous ping at this computer whilst it is booting and I don't get a response until after /etc/fstab has been processed. If this is the reason, can I start them these processes earlier?

Another option would be to have a script/command run when the computer boots, but prior to MySQL loading. If this is possible, it would also satisfy my problems.

View 4 Replies View Related

Debian Programming :: Replace Certain Text In A File With Person Username Automatically?

Mar 16, 2014

Is there any way to use sed to replace certain text in a file with the persons username automatically? Right now i'm using
Code: Select allsed -i.bak s/STRING_TO_REPLACE/STRING_TO_REPLACE_IT/g file.foo

I would like it to automatically inject the persons usrname in the replacement string. Is this possible? I've been looking on line at various sed tutorials and I cant quite find what i'm looking for. I also didn't really see anything in the forums search function.Essentially i'm trying to take this file URL...Android.rules and replace all instances of username with the persons actual username automatically.

Code: Select allsed -i.bak s/username/$USER/g 51_Android.rules

View 0 Replies View Related

Ubuntu Servers :: Log File Automatically Emailed After The Last Script Finishes Entering Data Into It?

Aug 3, 2011

I'm looking for a way to have a file automatically emailed after the last script finishes entering data into it. What would be the best way to do it?

View 3 Replies View Related

Ubuntu Servers :: Grub To Automatically Boot - Wont Automatically Select One

Feb 28, 2011

I am having trouble getting grub to automatically boot into ubuntu server. When I turn on my server the grub menu shows up and shows me the choices. They all work fine except that grub wont automatically select one. This wouldn't be too much of a problem but this is a headless server and I can't boot into ubuntu without a keyboard. I tried looking through the grub 2 documentation but nothing seemed to work when I edited the conf file.

View 1 Replies View Related

Fedora :: Fstab Ext3 F11 - Automatically Mount The Drive In File Tree At The Location /mnt/TheDrive?

May 15, 2010

With a 1Tb USB drive plugged in, we'll call it "TheDrive", I boot my machine and "TheDrive" is mounted automatically. The icon is on the desk-top. "TheDrive" mounts to /media/TheDrive. Everything is fine. But, I would like to automatically mount the drive in my file tree at the location /mnt/TheDrive. I would not like to have the drive automatically mounted to /media/ and appear on the desktop. I know that this requires the use of fstab; but, I do not know what to add to this file.

[Code]...

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved