grep can search one or many files for a word or phrase. To search one file for the phrase “Libby the dog”, try this: grep "Libby the dog" file.txt Note that you use quotation marks around your phrase because you are searching for a...
To view the first lines of a text file, use the head command. head file.txt = show first 10 lines of filehead -25 file.txt = show first 25 lines of file To view the last lines of a text file, use the tail command. tail...
Linux Linux is a collective name for a class of Unix computer operating systems. The name of the kernel of the Linux operating system is also “Linux”. The Linux operating system is also...
I had several files that had spaces in their names and I wanted to convert those spaces to underscores. Here’s how I did it. If you don’t have one already, make a bin directory in your home directory: cd mkdir bin In...
Less
ls | less
Commands to use with less:
space = move ahead a pageb = move back a pageq = quit less
When the LILO: prompt appears (or boot: prompt if you inserted a boot disk), enter: linux -s or linux single When the bash# prompt appears, enter: passwd This will then prompt you for a new root password, without asking for the old one...
Soft links Pointers to programs, files, or directories located elsewhere (just like Windows shortcuts)If the original program, file, or directory is renamed, moved, or deleted, the soft link is broken. If you type ls -F you can see...
Run at the command line:
cat /proc/meminfo = memory usage information
free = how much memory is currently unused
You should really only run this command on text documents, not binary (Word, StarOffice, etc.) documents. At the command line, enter: ispell <document name> The following screen will appear highlighting the word with spell errors and...
What’s the difference between installing and upgrading an RPM? And what happens if you upgrade even though you haven’t installed first? If you install an upgrade, typically what happens is that the software is now installed if it...