ಡೈರೆಕ್ಟರಿ ಸೇರಿದಂತೆ ಎಲ್ಲವೂ ಲಿನಕ್ಸ್ನಲ್ಲಿರುವ ಫೈಲ್ ಆಗಿದೆ. ಡೈರೆಕ್ಟರಿ ಕೇವಲ ಫೈಲ್ಗಳ ಗುಂಪು.
ಲಿನಕ್ಸ್ನಲ್ಲಿ ಫೈಲ್ಗಳು ಮತ್ತು ಡೈರೆಕ್ಟರಿಗಳನ್ನು ಅಳಿಸುವ ಮುಖ್ಯವಾಗಿ ಎರಡು ಆಜ್ಞೆಗಳಿವೆ:
rm
rmdir
ದಿ rmdir
ಲಿನಕ್ಸ್ನಲ್ಲಿ ಖಾಲಿ ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸಲು ಆಜ್ಞೆಯನ್ನು ಬಳಸಲಾಗುತ್ತದೆ.
ಉದಾಹರಣೆಗೆ, ಈ ಕೆಳಗಿನ ಕೋಡ್ “ಇಮೇಜ್ಗಳು” ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸುತ್ತದೆ, ಅದರಲ್ಲಿ ಯಾವುದೇ ಫೈಲ್ಗಳಿಲ್ಲ:
$ rmdir images/
ನಾವು rm
ಅನ್ನು ಸಹ ಬಳಸಬಹುದು ಜೊತೆ ಆಜ್ಞೆ -d
ಖಾಲಿ ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸುವ ಆಯ್ಕೆ:
$ rm -d images/
ಸೂಚನೆ:ಡೈರೆಕ್ಟರಿಯೊಳಗೆ ಫೈಲ್ಗಳಿದ್ದರೆ, ನಾವು ಬಳಸಲಾಗುವುದಿಲ್ಲ rmdir ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸಲು.ಖಾಲಿ ಇಲ್ಲದ ಡೈರೆಕ್ಟರಿಯಲ್ಲಿ ನಾವು ಮೇಲಿನ ಆಜ್ಞೆಯನ್ನು ಪ್ರಯತ್ನಿಸಿದರೆ, ನಾವು ಪಡೆಯುತ್ತೇವೆ:
$ rmdir images/ rmdir: images/: Directory not empty
ಎಲ್ಲಾ ವಿಷಯಗಳೊಂದಿಗೆ ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸಲು rm
ಅನ್ನು ಪುನರಾವರ್ತಿತವಾಗಿ ಬಳಸಿ ಆರ್ಗ್ಯುಮೆಂಟ್ನೊಂದಿಗೆ ಆಜ್ಞೆ -r
.
$ rm -r images/
ನೀವು ಡೈರೆಕ್ಟರಿಯನ್ನು ಸಹ ಅಳಿಸಬಹುದು ಮತ್ತು ಅದರ ಎಲ್ಲ ವಿಷಯಗಳನ್ನು ಬಲವಂತವಾಗಿ -rf
ವಾದ.
$ rm -rf images/
ಲಿನಕ್ಸ್ನಲ್ಲಿ ಫೈಲ್ ಅನ್ನು ಅಳಿಸಲು, rm
ಅನ್ನು ಬಳಸಿ ಆಜ್ಞೆ:
$ rm cat.gif
ಫೈಲ್ ಅನ್ನು ಅಳಿಸಲು ಒತ್ತಾಯಿಸಲು ಬಳಸಿ -f
rm
ನೊಂದಿಗೆ ಆಯ್ಕೆ ಆಜ್ಞೆ:
$ rm -f cat.gif
ಫೈಲ್ ಅಥವಾ ಡೈರೆಕ್ಟರಿಯನ್ನು ಅಳಿಸುವ ಮೊದಲು ದೃ mation ೀಕರಣಕ್ಕಾಗಿ ನಿಮ್ಮನ್ನು ಕೇಳಬೇಕಾದರೆ, ಬಳಸಿ -i
rm
ನೊಂದಿಗೆ ಆಯ್ಕೆ ಆಜ್ಞೆ:
$ rm -i cat.gif remove cat.gif? y
ಅಳಿಸಿದ ಫೈಲ್ಗಳ output ಟ್ಪುಟ್ ನೋಡಲು -v
ಆಯ್ಕೆ:
$ rm -v cat.gif cat.gif
ಒಂದು ಕಾರ್ಯಾಚರಣೆಯಲ್ಲಿ ಅನೇಕ ಫೈಲ್ಗಳನ್ನು ಅಳಿಸಲು, ನಾವು ಇದನ್ನು ಬಳಸುತ್ತೇವೆ *
ವೈಲ್ಡ್ಕಾರ್ಡ್.
ಉದಾಹರಣೆಗೆ, ಈ ಕೆಳಗಿನ ಕೋಡ್ ಎಲ್ಲಾ ಚಿತ್ರಗಳನ್ನು .gif
ನೊಂದಿಗೆ ಅಳಿಸುತ್ತದೆ ವಿಸ್ತರಣೆ:
ls images/ bird.png cat.gif dog.gif rm *.gif ls images/ bird.png
rm [-dfiPRrvW] file ...
ಕೆಳಗಿನ ಕೋಷ್ಟಕವು rm
ಬಳಕೆಯನ್ನು ತೋರಿಸುತ್ತದೆ ಅದರ ಎಲ್ಲಾ ಆಯ್ಕೆಗಳೊಂದಿಗೆ ಆಜ್ಞೆ ಮಾಡಿ.
+--------+---------------------------------------------------------------------------------------------------------------------+-----+-----+ | Option | Description
|
|
| +--------+---------------------------------------------------------------------------------------------------------------------+-----+-----+ | -d
| Attempt to remove directories as well as other types of files.
|
|
| | -f
| Attempt to remove the files without prompting for confirmation, regardless of the file's permissions.
|
|
| | -i
| Request confirmation before attempting to remove each file, regardless of the file's permissions
|
|
| | -P
| Overwrite regular files before deleting them.
|
|
| | -R
| Attempt to remove the file hierarchy rooted in each file argument.
|
|
| | -r
| Same as -R
|
|
| | -v
| Be verbose when deleting files, showing them as they are removed.
|
|
| | -W
| Attempt to undelete the named files. Currently, this option can only be used to recover files covered by whiteouts. |
|
| +--------+---------------------------------------------------------------------------------------------------------------------+-----+-----+