how will u execute a file in unix




Answers were Sorted based on User's Feedback



how will u execute a file in unix..

Answer / ravneet

if the file doesn't have executable permissions than assign
the same as chmod 755 <filename>. after that execute the
same by using command ./<filename>

Is This Answer Correct ?    25 Yes 2 No

how will u execute a file in unix..

Answer / narendrasairam

Depending on the type of shell you can execute a file in
either of the ways
1) ksh <filename>
2) sh <filename>
If the file already possess execute bit set on it, then you
can directly execute the file with its name alone
1) <filename>

Is This Answer Correct ?    17 Yes 0 No

how will u execute a file in unix..

Answer / eugene

sudo chmod +x filename
./filename

Is This Answer Correct ?    6 Yes 1 No




how will u execute a file in unix..

Answer / lokesh

There are lot of ways by which u can execute a file in Unix.

1. ./<filename>

2. <filename> #only if the permissions are in place for the
user

3. sh <filename> #uses bash shell

4. nohup <filename> #the process doesn't get killed even on
reboot

5. Batch <filename>

6. at <time> <filename> #to schedule the job

7. U can also autorun it by making an entry into the cron

Is This Answer Correct ?    3 Yes 1 No

how will u execute a file in unix..

Answer / visu_kvg

Yes the above answer is absolutely apt.

Is This Answer Correct ?    3 Yes 3 No

how will u execute a file in unix..

Answer / hari

$sh f.sh

Is This Answer Correct ?    1 Yes 1 No

how will u execute a file in unix..

Answer / rajasekhar

chmod 777 filename

Is This Answer Correct ?    2 Yes 3 No

how will u execute a file in unix..

Answer / bhaskar

chmod - R 755 foldername

Is This Answer Correct ?    2 Yes 8 No

Post New Answer



More Unix Commands Interview Questions

What is the output of : $ ps-e $ ps-a commands

5 Answers   IBM,


what is virtual machine?

2 Answers   Infosys,


what is the difference between "cron" command and "at" command?

5 Answers  


distinguish between paging and swapping?

3 Answers   Infosys,


what do you understand bythe term 'de-mountable volumes'?

2 Answers   Infosys,






What is shrinking file system in AIX where it actually resides?

0 Answers  


What is the difference between pipe and xargs?

2 Answers   CTS, Amazon,


What is the syntax of grep command and what is its use?

6 Answers  


in unix echo is used for

10 Answers   Patni, BirlaSoft, BFL,


how to make IGNITE-BACKUP in HP-UX?

4 Answers   HP,


In UNIX, what is the command to edit contents of the file?

9 Answers  


distinguish between physical addresses and logical address?

23 Answers   TATA, TCS, CTS, Infosys, College School Exams Tests, SAX,






Categories