246 Part II (Web server extensions) . Getting Around in Linux

246 Part II . Getting Around in Linux Deleting files Another task often required when working with files and directories is removing them. The rm command (short for remove) is used to delete files and directories on Linux systems. The rmcommand uses the following syntax: rm -options FILE Several options can be used with the rmcommand. The most frequently used options are shown in Table 6-10. Table 6-10 Options Used with rm Option Use -f Processes filenames without prompting, even if they don t exist. -i Prompts the user when removing files. -r Removes directory contents recursively. -d Used by superuser. Removes directories regardless of whether they are empty. -v Verbosely removes files. In the following example all files in the pwd beginning with nn are deleted. # rm nn* The second command removes all files located in the filesdirectory verbosely, along with the directory itself. # rm -frv files removing files/fileaa removing files/fileab removing files/fileac removing files/filead removing files/fileae removing files/filespace removing the directory itself: files Creating directories At this point we have covered the creation and removal of files as well as the removal of directories. Now we will examine the mkdircommand (short for make directory) that is used to create directories. This is a very basic command that can create one directory layer at a time. When used with the p option parent
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply