The default number is ten, but this can be controlled via the -n option. Head outputs a number of the first (“head”) lines of a file, while tail outputs a number of last (“tail”) lines of a file. Less is newer and offers more options, so there is no reason to use more.Īnother pair, but here both halves have their uses. Well, if you pipe it into one of these, you can now scroll it at your leisure. Perhaps you called cat on a file and your terminal emulator took a few seconds to scroll all the text. Imagine a very long output from some command. These two similar utilities allow you to view text chunked into screenfuls. A normal user may change permissions for files he owns. This refers to viewing, writing and executing files. You aren’t very likely to ever use hard links, but knowing they’re aliases to files – as opposed to symlinks, which are aliases to file names – can’t hurt.Ĭhange user permissions. Symbolic or soft links are sort of like Windows shortcuts, they provide a convenient way of accessing a particular file, though the analogy doesn’t quite hold – symlinks can point to anything, but do not feature any metadata. Deleting directories requires recursive operation, so once again we have the -r switch.Ĭreates hard or symbolic links between files. Although nowadays you’d really have to work on it to cause some damage to the system, you can still damage yourself – rm doesn’t remove files to some imaginary wastebasket from which you can fish them out later when you realize you’ve made a horrible mistake, and “rm ate my homework” isn’t going to convince anyone. Certainly a very useful command to know, as you cannot remove clutter without it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |