LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-02-2019, 08:15 PM   #136
Shiori-kun
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Rep: Reputation: 3

Since I do a butt load of remote shell work, screen is my favorite tool. As for key/code tricks; tab-complete, pipeing, && (command stringing) and arrow-up
 
Old 10-02-2019, 08:16 PM   #137
keithcambron
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
When you are using ssh for a remote login and the far end hangs or the far end terminal emulator becomes unpredictable, enter the command: ~. (tilde dot) to close the connection. It preserves your client side terminal session. You can then just hit the up arrow key to invoke ssh again.
 
Old 10-02-2019, 09:04 PM   #138
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,113
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Learned a little using

Code:
 locate .ko
when searching for driver module location for a thread today.
 
Old 10-02-2019, 09:34 PM   #139
it643c
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
I was like this is the WORD "Linux" and then I was like NO what did I do.

I should have posted my first comment a few years ago, however, I'm consumed with Linux now and fewer windows os versions.

Linux Rules
 
Old 10-03-2019, 02:34 AM   #140
doonit
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
This might seem stupid but I can't tell you how happy I was to learn that the middle mouse button does quick copy/paste
 
Old 10-03-2019, 02:57 AM   #141
dimirx
LQ Newbie
 
Registered: Dec 2014
Posts: 3

Rep: Reputation: Disabled
mkdir /tmp/foo-bar-baz
cd !$
 
1 members found this post helpful.
Old 10-03-2019, 03:18 AM   #142
harshanev
LQ Newbie
 
Registered: Dec 2015
Posts: 21

Rep: Reputation: Disabled
favorite linux trick

I like all regular expressions. You can do a lot with them.

find . -name *.c |xargs grep main()
 
Old 10-03-2019, 03:35 AM   #143
zentara
LQ Newbie
 
Registered: Jul 2011
Posts: 24

Rep: Reputation: Disabled
kill -1 -1
 
Old 10-03-2019, 05:14 AM   #144
erkki.ruohtula
LQ Newbie
 
Registered: Jun 2012
Location: Helsinki, Finland
Distribution: CentOS, Mint, Fedora
Posts: 7

Rep: Reputation: Disabled
I have used the following two aliases for decades, and install as the first thing in any new shell environment:
Code:
alias p='pushd'
alias P='popd'
They make traversing down and up directory hierarchies much more convenient. Use like this:

Code:
erkki-desktop2:.../~$ p sub
~/sub ~
erkki-desktop2:.../sub$ p sub1
~/sub/sub1 ~/sub ~
erkki-desktop2:.../sub1$ P
~/sub ~
erkki-desktop2:.../sub$ p sub2
~/sub/sub2 ~/sub ~
erkki-desktop2:.../sub2$ p sub3
~/sub/sub2/sub3 ~/sub/sub2 ~/sub ~
erkki-desktop2:.../sub3$ P
~/sub/sub2 ~/sub ~
erkki-desktop2:.../sub2$ P
~/sub ~
erkki-desktop2:.../sub$ P
~
erkki-desktop2:.../~$
I did not invent them, I am not sure any more, but they probably originally came from some BSD unix .cshrc .
 
Old 10-03-2019, 05:40 AM   #145
stevethefiddle
Member
 
Registered: Feb 2011
Posts: 32

Rep: Reputation: 24
Quote:
Originally Posted by m.a.l.'s pa View Post
Ctrl+R ("reverse-i-search"), to pull up previously-used commands from bash history. And pasting selected text into the command line with a middle mouse click.
Snap. These are also my favourites
 
Old 10-03-2019, 08:25 AM   #146
username_11011
Member
 
Registered: Nov 2017
Location: Odessa, TX
Distribution: slackwarearm
Posts: 30

Rep: Reputation: Disabled
Probably using curl to send texts. I have a script that acquires my gmail password (uses a hash I created to check that I entered the password correctly). So, I can use that to store my password in a bash variable with no need to store the password in my bash history. Then, I can send a text like this:
Code:
text_pw $password $my_name machine_name:\ this\ is\ a\ text\ message
Pretty useful. I start jobs all the time (say compiling with make or cp of an extremely large file) that take an extended period of time. So, I start screen. And, I type out whatever command followed by a semi colon. Then, I type myself a text message and start the job. Then (of course) detach from screen and (knowing me) detach from whatever remote machine I'm attached to. And when the job stops, I get a text message.
 
1 members found this post helpful.
Old 10-03-2019, 08:54 AM   #147
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I'm pretty proud of this one.

CLI app to get podcast feed URLs
 
Old 10-03-2019, 09:08 AM   #148
mike@kenny.net
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
For those that like ctrl-r (to activate 'reverse-i-search'), take it to a much higher level by installing 'hstr' ( https://github.com/dvorka/hstr )
 
Old 10-03-2019, 10:24 AM   #149
andrewbocho
LQ Newbie
 
Registered: Jun 2019
Posts: 11

Rep: Reputation: Disabled
I like the terminal for purging if/when I delete something.
 
Old 10-03-2019, 01:40 PM   #150
codingisasnare
LQ Newbie
 
Registered: Sep 2019
Posts: 1

Rep: Reputation: Disabled
Post Watch a directory for changes

watch -d ls -lt
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: What is your favorite Linux terminal trick? LXer Syndicated Linux News 0 08-01-2018 12:41 PM
Poll: (Without the poll) - How is Linux used in your workplace? SlowCoder General 13 09-11-2007 11:03 PM
vim :gui trick and undo-trick dazdaz Linux - Software 3 09-10-2007 02:45 PM
Poll: What is your favorite brand of Motherboard? dstrbd1 Linux - Hardware 2 02-16-2006 05:40 PM
Weekly Hardware Poll, Dec 14th: What's your favorite notebook? finegan Linux - Hardware 18 12-03-2004 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration