in reply to Re^2: Not able to use native linux commands in a perl script
in thread Not able to use native linux commands in a perl script
You say that 'nihad' is in 'my root directory'. The use of a possessive bothers me. Some people use 'my root dir' and 'my home dir' interchangeably. Also, since most linux installations have a /root directory (the home dir for user root), that is often what people refer to as the 'root directory'. If, indeed, the file 'nihad' is in the '/' directory, the only reason I can see for it not working is permissions. Does the user you are running the script under have read-permission for both the file 'nihad' and the directory '/'? What happens when you type this command from the shell, as the same user (without the 'f' option, so it will give you an error message if it fails)?#! /usr/bin/perl print "Hi\n"; `cp -rf /nihad /tmp/`;
fnord
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Not able to use native linux commands in a perl script
by Nihad Nizar (Initiate) on Dec 15, 2010 at 06:14 UTC |