Linux Commands: Execute a command
exec-Linux Command
exec
Execute a command
SYNTAX
exec [-cl] [-a name] [command [arguments]]
OPTIONS
-l Place a dash at the beginning of the zeroth arg passed to command.
(This is what the login program does.)
-c Causes command to be executed with an empty environment.
-a The shell passes name as the zeroth argument to command.
If command is supplied, it replaces the shell without
creating a new process. If no command is specified, redirections
may be used to affect the current shell environment.
If there are no redirection errors, the return status is zero; otherwise the
return status is non-zero.
exec is a BOURNE shell command and a POSIX `special' builtin
To execute a shell script from the command line, prefix the script's name with ./
./myscript
You may be tempted to fix this by adding '.' to your $PATH but this is widely considered to be a bad idea (for security reasons).
If you want to execute something in the current directory, just type
the "./" in front of the command name.
Other Linux Commands:
alias ,
break ,
builtin ,
cal ,
case ,
cat ,
cd ,
cfdisk ,
chgrp ,
chmod ,
chown ,
chroot ,
cksum ,
cmp ,
comm ,
command ,
continue ,
cp ,
cron ,
crontab ,
csplit ,
cut ,
date ,
dc ,
dd ,
declare ,
df ,
diff ,
diff3 ,
dir ,
dircolors ,
dirname ,
dirs ,
du ,
echo ,
egrep ,
enable ,
env ,
eval ,
exec ,
expand ,
export ,
expr ,
factor ,
false ,
fdformat ,
fdisk ,
fgrep ,
find ,
fmt ,
fold ,
for ,
fsck ,
function ,
getopts ,
hash ,
hashcharacter ,
head ,
history ,
hostname ,
id ,
if ,
import ,
install ,
join ,
kill ,
less ,
let ,
ln ,
local ,
locate ,
logname ,
logout ,
lpc ,
lpr ,
lprm ,
ls ,
m4 ,
man ,
mbadblocks ,
mkdir ,
mkfifo ,
mknod ,
more ,
mount ,
mtools ,
mv ,
nice ,
nl ,
nohup ,
passwd ,
paste ,
period ,
popd ,
pr ,
printf ,
ps ,
pushd ,
pwd ,
quota ,
quotacheck ,
quotactl ,
ram ,
rcp ,
read ,
readonly ,
return ,
rm ,
rmdir ,
rsync ,
sdiff ,
sed ,
select ,
seq ,
set ,
shift ,
shopt ,
shutdown ,
sleep ,
sort ,
split ,
su ,
sum ,
symlink ,
sync ,
tac ,
tail ,
tar ,
tee ,
test ,
time ,
times ,
top ,
touch ,
tr ,
traceroute ,
true ,
tsort ,
tty ,
type ,
ulimit ,
umask ,
uname ,
unexpand ,
uniq ,
units ,
unset ,
unshar ,
until ,
useradd ,
usermod ,
users ,
uuencode ,
watch ,
wc ,
whereis ,
which ,
while ,
who ,
xargs ,
yes ,
Live2Support.com :