He konae nga mea katoa i Linux tae atu ki te raarangi. Ko te whaiaronga he roopu konae noa.
Ko nga ture e rua kei te muku i nga konae me nga raarangi whai papaanga i te linux:
rm
rmdir
Ko te rmdir
whakamahia te tono ki te muku i te whaiaronga kau i linux.
Hei tauira, ko te waehere e whai ake nei ka muku i te raarangi 'whakaahua' kaore he konae o roto:
$ rmdir images/
Ka taea hoki e taatau te whakamahi i te rm
whakahau me te -d
kōwhiringa ki te muku i te whaiaronga kau:
$ rm -d images/
Panui:Mena he konae kei roto i te raarangi, kaore e taea te whakamahi rmdir ki te muku i te whaiaronga.Mena i whakamatauhia e maatau te whakahau i runga ake nei mo te raarangi kore-kore, ka whiwhi maatau:
$ rmdir images/ rmdir: images/: Directory not empty
Hei muku i te raarangi whaiaronga me nga mea katoa kei roto te whakamahi i te rm
whakahau me te tohe -r
.
$ rm -r images/
Ka taea hoki e koe te whakakore i tetahi raarangi me nga korero katoa me te kaha o te -rf
tautohe.
$ rm -rf images/
Hei muku i tetahi konae ki te linux, whakamahia noa te rm
whakahau:
$ rm cat.gif
Hei akiaki i te whakakore i tetahi konae whakamahi i te -f
kōwhiringa me te rm
whakahau:
$ rm -f cat.gif
Mena kei te hiahia koe kia akiaki koe mo te whakatuturutanga i mua i to whakakore i tetahi konae, raarangi ranei, whakamahia te -i
kōwhiringa me te rm
whakahau:
$ rm -i cat.gif remove cat.gif? y
Kia kite i tetahi putanga o nga konae kua mukua e whakamahia ana -v
kōwhiringa:
$ rm -v cat.gif cat.gif
Hei muku i nga konae maha i roto i te mahinga kotahi, ka whakamahia te *
kāri kākāho
Hei tauira, ko te waehere e whai ake nei ka muku i nga whakaahua katoa me te .gif
toronga:
ls images/ bird.png cat.gif dog.gif rm *.gif ls images/ bird.png
rm [-dfiPRrvW] file ...
E whakaatu ana te ripanga i raro ake nei i te whakamahinga o te rm
whakahau me ona waahanga katoa.
+--------+---------------------------------------------------------------------------------------------------------------------+-----+-----+ | 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. |
|
| +--------+---------------------------------------------------------------------------------------------------------------------+-----+-----+