RMDIR(3) 1 RMDIR(3)rmdir - Removes directorySYNOPSIS
bool rmdir (string $dirname, [resource $context])
DESCRIPTION
Attempts to remove the directory named by $dirname. The directory must be empty, and the relevant permissions must permit this. A E_WARN-
ING level error will be generated on failure.
PARAMETERS
o $dirname
- Path to the directory.
o $context
-
Note
Context support was added with PHP 5.0.0. For a description of contexts, refer to "Streams".
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.0.0 | |
| | |
| | As of PHP 5.0.0 rmdir(3) can also be used with |
| | some URL wrappers. Refer to "Supported Protocols |
| | and Wrappers" for a listing of which wrappers |
| | support rmdir(3). |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
rmdir(3) example
<?php
if (!is_dir('examples')) {
mkdir('examples');
}
rmdir('examples');
?>
NOTES
Note
When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script
that is being executed.
SEE ALSO is_dir(3), mkdir(3), unlink(3).
PHP Documentation Group RMDIR(3)
Check Out this Related Man Page
UNLINK(3) 1 UNLINK(3)unlink - Deletes a fileSYNOPSIS
bool unlink (string $filename, [resource $context])
DESCRIPTION
Deletes $filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure.
PARAMETERS
o $filename
- Path to the file.
o $context
-
Note
Context support was added with PHP 5.0.0. For a description of contexts, refer to "Streams".
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.0.0 | |
| | |
| | As of PHP 5.0.0 unlink(3) can also be used with |
| | some URL wrappers. Refer to "Supported Protocols |
| | and Wrappers" for a listing of which wrappers |
| | support unlink(3). |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Basic unlink(3) usage
<?php
$fh = fopen('test.html', 'a');
fwrite($fh, '<h1>Hello world!</h1>');
fclose($fh);
unlink('test.html');
?>
SEE ALSO rmdir(3).
PHP Documentation Group UNLINK(3)
cd...
dir...
rem ...
type...
del...
copy...
mkdir...
rmdir...
attrib...
And how can I get this information?
My email address is ***removed***
By way the 001 are numbers. (3 Replies)
Hi,
I am having hard time to delete a directory:
$ rm -r testoxdwdw
rm: testoxdwdw non-existent
$ rmdir testoxdwdw
rmdir: testoxdwdw: No such file or directory
$ rm -rf testoxdwdw
Thanks! (2 Replies)
Hello
I'm working on a PHP project right now and when I try to run 'mkdir' I've been getting an error:
code:
mkdir("<full path>/test", 0700);
error:
PHP Warning: mkdir() : SAFE MODE Restriction in effect. The script whose uid is 10002 is not allowed to access <full path> owned by uid... (2 Replies)
script is:
dirname= "$(date +%b%d)_$(date +%H%M)"
mkdir $dirname
should create a directory named Nov4_
Instead I get the following returned:
root@dchs-pint-001:/=>./test1
./test1: Nov04_0736: not found.
Usage: mkdir Directory ...
root@dchs-pint-001:/=>
TOO easy, but what am I... (2 Replies)
Hello,
We use a very basic version of unix via putty and are not experts by any means.
We accidentally submitted the statement: "mkdir -l" ("dash-letter L) and a new directory was created. Putty/UNIX will now not recognize the statement "rmdir -l". When we run a "ls -l" command, it shows... (3 Replies)
Hello,
I'm looking for a way to use PSFTP or PSCP, executed from a batch file in Windows, to delete an entire folder and its contents. I can run a script using PSFTP which can use rm or rmdir, but the -rf command doesn't work. Any suggestions on another client to use in the same context, or a... (2 Replies)
Hi everybody,
Please some help over here, I`m pretty new in PHP.
I have a cronrefresh php file within a website, I need this script get infornation from a URL of the site.
Part of the script where $URL variable appears is:
$fdURL = mysql_query("SELECT * FROM affiliSt_config WHERE name... (2 Replies)
Is there any possibility of running the PHP script in a debug mode ?
If so, do i have to download any package? Any free downloads available?
Can anyone please guide me through? Am a newbie in PHP scripting.
Thanks in Advance! (1 Reply)
hi,
I am trying to remove the last field before the period (.) from a list of file names in a directory in a shell script.
Below is the list of file names.
ENVID_archival_20120214092258.log
ENVID_Get_Source_Files_20120214091828.log
ENVID_Get_Source_Files_20120214092523.log... (6 Replies)
So I have a Networking class at my university that involves learning the basic commands of unix (i.e. Chmod, cat, cp, ls, mv, rm, mkdir, rmdir, pwd, etc) and my professor had us download and install Solaris and PuTTY as a means of...I suppose practicing using/executing commands. However due to... (7 Replies)
Hi
How to completely delete directory with all it contents
I try to use rmdir -r but it give error
Thanks
---------- Post updated at 03:10 AM ---------- Previous update was at 02:52 AM ----------
Hi all
I got the solution for my thread
i use mkdir with the option -p
Thanks (1 Reply)
Oracle Linux 6.4
bash shell
I am trying to remove the directory named OPatch. I am trying to run rm and rmdir commands while logged in as grid user, the owner of the directory.
But I keep getting "Permission denied" error. It is an empty directory. Any idea why I am getting 'Permission denied'... (5 Replies)