LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2008, 01:33 AM   #1
sky_amy
LQ Newbie
 
Registered: May 2008
Posts: 5

Rep: Reputation: 0
How to unpack source.n.gz


HI,
Can someone please help me. I have a file to be run with source command. But when run
> source .file

An error Command not found appeared. I typed whereis source and it gives me
/usr/share/man/man1/source.1.gz
/usr/share/man/mann/source.n.gz

How do I unpack the command source?
 
Old 05-27-2008, 02:03 AM   #2
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 35
Source is a bash builtin, so you won't have any executable, that's ok. I'd rather make sure .file is there. Is your .file really hidden? Try
Code:
source file
Note: This is without the dot.
 
Old 05-27-2008, 07:07 PM   #3
seraphim172
Member
 
Registered: May 2008
Posts: 101

Rep: Reputation: 15
The 'source' command is used to read a settings file. If one changes for example some profile settings in .bashrc, then 'source .bashrc' will read the file and make the settings available to the current environment.

Linux Archive

Last edited by seraphim172; 06-25-2008 at 05:36 AM.
 
Old 05-27-2008, 07:28 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Actually, source just inserts the (shell) file contents into the current env/file at the point where it is called.
Think of it as a dynamic include.
The sourced file can be any shell 'cmds', not just settings.
NB: source is a synonym for dot<space> eg

. file

is the same as

source file
 
Old 05-28-2008, 12:24 AM   #5
sky_amy
LQ Newbie
 
Registered: May 2008
Posts: 5

Original Poster
Rep: Reputation: 0
HI General Failure,

I did run source file, but the an error no such file appeared. The file is really hidden. I tried using source with other files, and it works.
 
Old 05-28-2008, 01:03 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
So there is a wrong command inside the file.
 
Old 05-28-2008, 02:51 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Looking at post #1 again, that looks like man pages for the source cmd, in which case don't even try. Just do

man source

and the man tool will handle it for you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to unpack and install mikeCanada Linux - Newbie 4 11-13-2005 07:30 AM
Unpack PE files bugman Programming 2 11-04-2005 01:05 AM
unpack it with what? wally58 Linux - Newbie 5 03-02-2005 11:10 AM
*.bz2 -- How do I unpack? nealkochhar Linux - Newbie 3 06-01-2004 07:35 PM
how do you unpack digital bots Linux - Newbie 5 04-09-2002 04:23 PM


All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration