Shortcut to clear command line terminal [duplicate]

1

This question already has an answer here:

How do I delete my commands quickly? 9 answers

Ctrl+U will only clean from the cursor to the beginning of the line, so if the cursor is at the end of the line, all the line will be cleaned, and if not, there will remain the characters after the cursor.

For a complete answer, I will say:

Ctrl+U - clear all the current line from the end to the beginning only if the cursor is at the end of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+K - clear all the current line from the beginning to the end only if the cursor is at the beginning of the line.

You can then recall the cleared line with Ctrl+Y if you need.

Ctrl+W - clear the previous word in the current line. For example if you have typed a command like git diff /path/to/some/file and you want to delete just the last parameter to the command, Ctrl+W is very useful.

You can then...
0 0
2

Boasting some of the best web development software, the ability to develop for almost any platform, and a great design and user experience, it's no wonder why Macs are used by many developers as their primary machine.

As a developer, being able to properly navigate your keyboard is one of the most useful skills you can have. Also, Macs are known for having their own proprietary set of keys that differ from more traditional keyboards.

Whether you're a recent convert from Windows or Linux, or you're about to start your first job out of school, here are 20 keyboard shortcuts on OS X that will make life easier if you're working in Terminal.

Option/Alt + Left or Right

This shortcut allows you to move the cursor between separate words in a command line. Use Option and the left arrow to move back and use Option with the right arrow to move forward down the line.

Control + W

Using this keyboard combination will delete the word immediately...

0 0
3

Q. I need to sort data from a log file but there are too many duplicate lines. How do I remove all duplicate lines from a text file under GNU/Linux?

A.. You need to use shell pipes along with following two utilities:

a] sort command – sort lines of text files

b] uniq command – report or omit repeated lines

Removing Duplicate Lines With Sort, Uniq and Shell Pipes

Use the following syntax:
sort {file-name} | uniq -u
sort file.log | uniq -u
Here is a sample test file called garbage.txt:

this is a test food that are killing you wings of fire we hope that the labor spent in creating this software this is a test unix ips as well as enjoy our blog

Type the following command to get rid of all duplicate lines:
$ sort garbage.txt | uniq -u
Sample output:

food that are killing you unix ips as well as enjoy our blog we hope that the labor spent in creating this software wings of fire

Where,

-u : check for strict...
0 0
4
X Window System

Ctrl + Alt + +
Switch to the next resolution in the X Window System. This works if
you've configured more than one resolution for your X server. Note that
you must use the + in your numeric keypad.

Ctrl + Alt + -
Switch to the previous X resolution. Use the - in your numeric keypad.

MiddleMouseButton
Paste the highlighted text. You can highlight the text with your left mouse button (or with some other highlighting method, depending on the application), and then press the middle mouse button

to paste. This is the normal copy-paste way in the X Window System, but it may not work in some X applications.

If you have a two-button mouse, pressing both of the buttons at the
same time has the same effect as pressing the middle one. If it
doesn't, you must enable 3-mouse-button emulation.

This works also in text terminals if you enable the gpm service.

Ctrl + Alt + Backspace
...

0 0
5

heh, he's got a point. There was -R switch there, though. *edit- turns out this is needed. You can't, apparently, select a directory as the source file unless you use it*

Anywho, that did it, my files are now copying as I wanted. However, 2 new problems, which I know aren't uncommon with terminal, are these.

1- The button linked to start this whole mess stays pressed until the copy is complete

2- My progress indicator doesn't show up anymore, dispite it being called before the copy begins, and being set to using a threaded animation (set uses threaded animation to true). It does, however, show up if an error occurs. I'm sure I'm forgetting something stupid here, though.

Last edited by Parrothead3 (2006-09-04 05:31:50...

0 0
6
Creating a Shortcut from the command line (batch file)
[ Back to Table of Contents ] [ > ]

XXCOPY TECHNICAL BULLETIN #38

From: Kan Yabumoto tech@xxcopy.com To: XXCOPY user Subject: Creating a Shortcut from the command line using XXMKLINK Date: 2013-02-28 =============================================================================== Introduction: The Shortcut (a.k.a. Shell Link) is a convenient object in Windows' environments that makes everyone's life easier. It is trivial to create one. Most Windows users know how. Here are just a few common ways: 1. Inside Windows Explorer, highlight an object (file or directory) and then Menu > File > Create Shortcut, and Bingo!!! Or, once you have an object highlighted, clicking the right mouse button will give you a floating menu that has the "Create Shortcut" option. 2. Windows Explorer also offers the Menu > File > New > Shortcut that opens the "Create Shortcut" wizard which...
0 0
7

In this post we will know about 30 useful Linux terminal keyboard shortcuts.The Linux keyboard shortcuts make your work on terminal very easy.We have tried to gather some useful Linux terminal keyboard shortcuts which can be run in system terminal as well as accessing machine with ssh command(Means through ssh terminal in short).
The given below shortcut keys has been tested in CentOS,Red Hat,Debian and Ubuntu.Most of the shortcut keys will also work in other Linux Distro

Ctrl+L Clear the screen
tab Tab key autocomplete the name of command/file/directory etc. For eg. type tou and type tab

UP ARROW Key Shows you previous command in descending order
DOWN Arrow Key When you are using UP ARROW Key to get previous command.Then try this DOWN Arrow,it will show forward command history

Ctrl+R It is for Reverse search.Press CTRL+R and type some command which you last run.It will search for last command you run.
Here we pressed CTRL+r then...

0 0