====== Unix command line cheat sheet ======
<code>
File Commands
ls - directory listing
ls -a - directo... contents of file
head file - output the first 10 lines of file
tail file - output the last 10 lines of file
tail -f file - output the contents of file as it grows, starting with the last 10 lines
sed 's/foo/bar/g' file - replaces all occurrence
> as well.
**Paragraphs** are created from blank lines. If you want to **force a newline** without a pa... ackslashes followed by a whitespace or the end of line.
This is some text with some linebreaks\\ Note that the
two backslashes are only recognized at the end of a line\\
or followed by\\ a whitespace \\this happens wi
====== Lightning fast command line use in Linux ======
You can use keyboard shortcuts and other command line tricks to make entering commands easier and faste... n terminal:
| Ctrl-a | Move to the start of the line. |
| Ctrl-e | Move to the end of the line. |
| Alt-] x | Moves the cursor forward to the next occurre
====== vim show linenumbers ======
Displaying line numbers while editing a file can be handy. This recipe describes how to turn on and off the display of line numbers in vi and vim.
While editing a document... ot inserting text), type the following to turn on line numbers:
:set number
If you tire of the line
====== Word footnotes have undeletable extra lines ======
====== Word Fussnoten haben nicht löschbare l... dit the separator. You'll probably see some blank lines before and/or after the little horizontal separator line itself. Delete those and close and go back to Pri... ph style doesn't include formatting
such as "Keep lines together", which could cause a lot of white spac
ources.list'' and add ''non-free contrib'' to all lines after ''main'', like so:
<code>
...
deb http://m... tice that the '\' is also removed from the second line.
Even more output
If you're after even more outp... t.
Open /etc/default/grub and find the following line:
GRUB_CMDLINE_LINUX=""
Add the verbose option... Open ''/etc/default/grub'' and find the following line:
GRUB_CMDLINE_LINUX=""
Add the elevator optio
them, but did you know there's a built-in command-line utility that can do just that? Here's how to do i... le to use the cipher.exe utility from the command line to securely overwrite files—all you need to do is... /securely-overwrite-files-with-a-built+in-command-line-trick?utm_source=feedburner&utm_medium=feed&utm_c
====== Search Google.com from the Linux command line ======
You can search Google.com from the Linux command line without using a CLI web browser like lynx or Elin... ips4linux.com/search-googlecom-from-the-linux-command-line/
{{tag>linux}}
~~LINKBACK~~
~~DISCUSSION~~
text editor with root permissions and look for a line with the following section of text:
relatime,e... en /boot/grub/menu.lst and find the following two lines:
# defoptions quiet splash
#altoptions=(rec... hem append the following at the end of both those lines:
rootflags=data=writeback
then save and exit
The allow/deny files consist of one user name per line.
==== Commands ====
export EDITOR=vi ;to spec... 5/15 do at 5,20,35,50
''
==== Example ====
A line in crontab file like below removes the tmp files... the following command At the end of the cron job line .
''
>/dev/null 2>&1
''
==== Generate log
Windows box from your Linux machine, the Command-Line Fu web site has you covered with the quick and ea... ssword section, you'll be prompted on the command line for the password—which might be more secure if yo
====== Tasks that are best done on the command line ======
Here are a few tasks that you might want to consider using the command line for.
===== Resizing images =====
Unless you are
er.reg and EnableScreenSaver.reg Note: The second line must be blank.)
<code>
Windows Registry Editor V... nSaver.reg.
* Change the 0 to a 1 in the fourth line.
* Save the file to your desktop with the nameE