Go Smart with REAR (pRay, rEad, leArn, tRy)

10/04/2013

DIRECTORY MANAGEMENT ON SLACKWARE

4:16 AM Posted by Vandaime No comments


Commonly used commands are :

mkdir = make a directory
rmdir = remove a directory
rm = removing a file or directory
cd = change directory
pwd = seeing the active directory
cp = copying a file or directory
mv = moving or changing the file or directory name


For example, we will create the directory cr45h / home/user :
$mkdir /home/user/cr45h
$cd /home/user/cr45h
$pwd
/home/user/cr45h

If we want to delete the directory, then we have to move from the current directory. Requirements that must be met to remove a directory is that a directory is empty.
$cd /
$rmdir /home/user/cr45h

Or if the directory isn't empty then we can remove them by force with the command :
#rm -rf /home/user/cr45h

0 comments:

Post a Comment