473,378 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

External Commands in LInux

anurag275125
Can anyone please tell me some external commands of Linux? Also explain type command in Linux?
Thanks
Jan 27 '10 #1
5 7174
RedSon
5,000 Expert 4TB
You need to define "external commands"; Also define "type command". No one knows what you are talking about.
Jan 27 '10 #2
To my understanding external commands are those which are not built-in to bash or think of these are hard-coded in to bash. Like, ifconfig, /bin/echo (mere echo is a built in command of bash). Assuming this is what you mean by external command, most of the commands we use are external commands. The internal command examples are 'if','while' etc..

Am i right with my assumption? :D
Jan 28 '10 #3
In my text book of Linux I have read that- There are two types of command in Linux namely Internal and external command. Internal commands are those commands that are automatically loaded into the system memory as soon as the system starts up. These commands will be available as long as the system is kept on like cp, mv, mkdir etc.

External commands are those that are available on a floppy/hard drive and are loaded in the memory of the computer when specially asked for.

my question was that can anyone tell me name of some external commands.

My another question was related to type command. type command followed by the command tell you the type of the command. for example--
$ type cat
cat is hashed (/bin/cat)

can anyone explain the output of this command as I found no manual entry for this command in ubuntu-9.0.4 system?

thanks.
Jan 29 '10 #4
RedSon
5,000 Expert 4TB
Your book is not very clear. There is only one type of command, it's a binary application. Those "commands" like "man", "cat", "type", "which", "more", "less" and others are just command line applications that people wrote. The reason you can use them easily is that the distributor of your Linux version (ubuntu) put those applications in a special directory that is "on the path".

The "path" is a environment variable that tells the system what file/folder paths to search when trying to find the name of an application that you typed on the command line.

When you type "cat" your shell knows that it should actually execute /bin/cat because /bin is on the path. When you type "type cat" the bash shell is telling you how each name (cat in this case) would be interpreted if used as a command name.

If you want to use a command that is not on the path then you need to specify the full name of it. Example: /home/username/myapplication.bin or whatever it's called. This assumes that your permissions are set up properly.

There is a difference between bash built-in commands and other commands but that is specific to bash. If you used zsh or some other shell you might have different built-in commands. This also changes given what distro you are running.
Jan 29 '10 #5
AmberJain
884 Expert 512MB
1. Some people say: "In unix, Commands are programs and programs are commands". Classifying commands as internal/external doesnot appears much logical to me. This concept dates back to old DOS days which had internal and external commands. So, maybe someone tried putting this analogous to way commands are classified under DOS.

2. man type: http://ss64.com/bash/type.html (?)
Feb 11 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Hal Vaughan | last post by:
I need to be able to run external commands from within a Java program, on Linux and Windows (and eventually OSX). Under most circumstances there is no problem, but if the path I specify as part of...
4
by: Avi Kak | last post by:
Is there a Python function in any of the standard-distribution modules that does what the backticks do in Perl? I want to run an external command and I'd like its output to be captured directly...
2
by: James Colannino | last post by:
Hey everyone. First off, I'm new to the list. I had had a little bit of experience with Perl before discovering Python. The more Python I learn, the more I love it :) I just have a quick...
2
by: Franck Diastein | last post by:
Hi, I'm designing an application, and I would like to be able to receive external commands... I would like a behavior like eMule, when you click on an ed2k link, the link is added to eMule, even...
3
by: Scott Emick | last post by:
I've been trying for some time now to decrypt with GPG from inside vb .net to no avail. my normal decrypt command goes something like this: gpg.exe --armor --passphrase-fd 0 <...
4
by: Tommy B | last post by:
I'm currently working on a script that I will run when I leave my computer on at night. It runs external commands like Ad-Aware, Spybot, AVG, Avast, and the like. The problem is, I want to know how...
1
by: saibotorama | last post by:
What is the Python translation for this Bash statement: tar cf - "${files}" | bzip2 "$file".tar.bz2 (Ignoring the fact that "tar cjf" also exists...) In other words, how does one pipe...
2
by: khushtarzia | last post by:
HI, Can anybody tell me how we can Execute DOS Internal or External commands like DIR, CLS,MD,RD or CHKDSK etc. from VB6? Thanks Khushtar Zia
11
by: RoB | last post by:
Hi all, I'm coming from the Informix world and I have a customer using DB2 8.2.3 for Linux on Red Hat Enterprise ES. The customer is performing filesystem backups of the containers etc every...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.