RM(1fun)

๐Ÿ“ฆ version 2.3, in ubuntu jammy

๐Ÿ’– RM(1fun) ๐Ÿ’–

okay bestie, sit down, hydrate, and let me tell you about rm โ€” the fun version, from section 1fun of the manual. yes there's a whole separate manual section for this and honestly? iconic. this is the page for deleting files, except it has opinions, and the opinion is about csh. ๐Ÿš๐Ÿ’€


โœจ NAME โœจ

rm โ€” remove files ๐Ÿ—‘๏ธโœจ (and, uh, so much more, we'll get there)


๐ŸŒธ SYNOPSIS ๐ŸŒธ

rm [-fri] [-C[2ABCFGMRSbcfjlmnpru]] file...

okay so like, file... is one or more files, and there are a LOT of options. like, a suspicious amount. buckle up. ๐ŸŽ€


๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

the command rm deletes each file argument from the system. and then there's justโ€ฆ a large number of options. an unhinged number. here we go.

  • -f โ€” Forced remove. files that are unwritable get removed without rm asking permission first. by default rm will ask permission before removing unwritable files, so this is the "don't ask, just do it" flag. ๐Ÿ’…
  • -r โ€” Recursive remove. for each argument that's a directory, rm recursively removes the entire hierarchy underneath it. and if all that worked out? the directory itself gets removed too. ๐ŸŒ€
  • -i โ€” Interactive remove. rm asks permission before removing anything. every single thing. yes it's a lot. yes it's polite. ๐Ÿฅบ
  • -C โ€” Remove csh files. "csh files" means files with an extension of .csh. when you use -C, the -f and -r flags get turned on, and / is used for the file argument. ๐Ÿ˜ณ (yes. that /. we're doing this.)

and then โ€” because that wasn't enough โ€” there's a host of modifiers:

  • -2 โ€” Translate csh source files to Modula 2. the extension gets changed to .m2.
  • -A โ€” Purge accounts of all users who had csh source files in their account, or who had used the csh this week. yeah. their account. ๐Ÿ‘€
  • -B โ€” Replace removed files with copies of the current bug list for the csh that can execute that particular file. in the unlikely event that more than one csh can execute the file, the buglists get catenated together. WARNING: this can consume an inordinate amount of disk space. like, your disk is GONE, bestie. ๐Ÿ’€
  • -C โ€” Remove all csh shells from the system. (same letter, different modifier energy, keep up ๐Ÿซถ)
  • -F โ€” Flame option. after removing files, make a posting to comp.unix.shell describing exactly how well csh works. ๐Ÿ”ฅ
  • -G โ€” Replace removed files with copies of the GNU manifesto. ๐Ÿ“œ
  • -M โ€” Mail source files to rms@mit-prep.mit.edu before removing. ๐Ÿ“ง
  • -R โ€” Raw eggs option. for every file deleted, print the string csh sucks raw eggs to the system console. ๐Ÿฅš๐Ÿฅš
  • -S โ€” Script option. delete shell scripts that call the csh shell too. ๐Ÿ“œ๐Ÿ’ฅ
  • -b โ€” Beat option. don't simply delete csh shells โ€” beat them to death with a stick first. ๐Ÿ
  • -c โ€” Don't remove csh source files, instead convert them to C++. the extension is changed to .c++. if this option is used together with the -G option, the Gnu copyright is prepended to the file when it's translated. โœจ
  • -f โ€” Force option. all files on the system are considered suspect and get examined for any csh tendencies. files containing any csh tendencies will be deleted. this is the only way to delete makefiles for csh programs. ๐Ÿ•ต๏ธโ™€๏ธ
  • -j โ€” In addition to deleting files, burn all copies of the Csh Reference Manual. ๐Ÿ”ฅ๐Ÿ“•
  • -l โ€” Lose option. this can only be used in conjunction with the -C option. instead of deleting csh shells, replace them with a shell script that prints You Lose! when invoked. ๐Ÿ˜ญ
  • -m โ€” After removing files, send mail to the project manager describing exactly how well csh shells work. if this option is used, a resume is also posted to misc.jobs.resumes. ๐Ÿ“„
  • -n โ€” Network option. don't limit deletion to the machine rm was invoked from โ€” delete all csh files from the entire network. ๐ŸŒ
  • -p โ€” Pascal option. translate csh source files to Pascal. the extension is changed to .p.
  • -r โ€” Run /usr/games/rogue while deleting csh files. ๐ŸŽฎ (yes, another -r. it contains multitudes.)
  • -u โ€” UUCP option. similar to the -n option. don't restrict deletion to the machine rm was invoked from โ€” delete files from all machines connected via UUCP. ๐Ÿ“ก

๐ŸŽ€ FILES ๐ŸŽ€

  • $HOME/resume โ€” for the -m option. ๐Ÿ“
  • /usr/csh/bugreports/* โ€” for the -B option. ๐Ÿ›

๐Ÿ˜ญ BUGS ๐Ÿ˜ญ

  • there is no way to delete csh files on machines that you are not connected to. devastating. truly. ๐Ÿ™ˆ
  • the -C option was written in csh, so of course it is ugly and non-portable. it's giving self-own. ๐Ÿ’€

okay that's the whole page bestie, you're officially certified in rm (fun edition). go forth, be careful with that / argument, and remember: this is the fun manual page โ€” the real one is way less entertaining. ๐Ÿฆ‹

signing off from the RM(1fun) page โ€” that's section 1fun, dated and versioned as the manual footer says โ€” mwah, stay hydrated, don't recursively delete your home directory ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from