LinuxQuestions.org
Review your favorite Linux distribution.
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-03-2019, 01:53 PM   #151
usernameok
LQ Newbie
 
Registered: Aug 2013
Distribution: Archlinux
Posts: 6

Rep: Reputation: Disabled

not a trick but usefull for recall complex commands

$ crtl + r

or

$ history | grep
 
3 members found this post helpful.
Old 10-04-2019, 04:16 AM   #152
Pastychomper
Member
 
Registered: Sep 2011
Location: Scotland
Distribution: Slackware, Devuan, Android
Posts: 132

Rep: Reputation: 243Reputation: 243Reputation: 243
Quote:
Originally Posted by username_11011 View Post
... 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.
I've used a less advanced (and more local) method to tell me when a job was done. Start job, type ctrl+g, and do something else in the same room. When the job finishes, the shell gets around to echoing the typed character, and beeps.

Doesn't work everywhere, though - some systems (like my laptop) send the sound to a disabled/missing PC speaker.

Last edited by Pastychomper; 10-04-2019 at 10:16 AM.
 
Old 10-04-2019, 09:52 AM   #153
WideOpenSkies
Member
 
Registered: May 2019
Location: /home/
Distribution: Arch Linux
Posts: 166

Rep: Reputation: 61
Quote:
Originally Posted by usernameok View Post
not a trick but usefull for recall complex commands

$ crtl + r

or

$ history | grep
I didn't know about ctrl + r. That's amazing! Thanks.
 
1 members found this post helpful.
Old 10-05-2019, 01:56 PM   #154
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Rep: Reputation: 24
Dummy file creation to interrupt long jobs

I use a dummy file to create a convenient break point in long jobs involving multiple repeat processes, eg
Code:
>~/q
for a running process that may have the form
Code:
for a in *.tiff; do
...
if [ -f ~/q ]; then break; fi
done
rm ~/q
 
2 members found this post helpful.
Old 10-07-2019, 09:29 AM   #155
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I just found out that 'pidof' has the option to omit (-o) the pid of the process calling pidof (%PPID) - in other words, I can use sth like this:
Code:
pidof -x -o %PPID "${0##*/}" && echo "I'm already running. Exiting." && exit 1
in a script that should not run several instances of itself at the same time.
 
2 members found this post helpful.
Old 10-17-2019, 10:02 AM   #156
Free_Ze
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by jeremy View Post
The official LQ poll series continues. This time we want to know: What's your favorite Linux terminal trick?

--jeremy
Ctrl-L to quickly clear the screen.
 
2 members found this post helpful.
Old 10-18-2020, 11:17 PM   #157
codetonic
LQ Newbie
 
Registered: Jan 2016
Posts: 3

Rep: Reputation: Disabled
Talking Command line semi-colon

When I was a sysadmin, a bunch of us went to lunch. As the waitress asked each person what they wanted, they would answer with the main dish, the waitress would ask what side to go with it, they would answer, the waitress asked what drink, they would answer. All the way around the table, same questions to each sysadmin. When she got to me, I took a deep breath and gave her the entire order in one shot. After she left, one of the other sysadmins turned to me and said, "You like to use the command line semi-colon, don't you."
 
4 members found this post helpful.
Old 10-19-2020, 12:23 AM   #158
Ourck19
LQ Newbie
 
Registered: May 2018
Location: France
Distribution: F33(KDEspin)/Buster10.5/Arch/Open-Suse
Posts: 10

Rep: Reputation: Disabled
poweroff !!!
Best & nice day
Fred.
 
Old 10-19-2020, 01:46 AM   #159
Septuagerian
LQ Newbie
 
Registered: Sep 2019
Location: [K]anada
Distribution: Linux Mint Cinammon
Posts: 3

Rep: Reputation: Disabled
Especially in summertime ...

watch -n 2 sensors. Will come back later to learn new stuff from y'all. 😎
 
1 members found this post helpful.
Old 10-19-2020, 01:56 AM   #160
Rocdufer
LQ Newbie
 
Registered: May 2012
Location: Mexico City
Distribution: Ubuntu and Debian
Posts: 7

Rep: Reputation: Disabled
In Debian, I always add this line in /etc/default/keyboard

XKBOPTIONS="caps:none"

Caps Lock key causes me to make typing mistakes. This nullification is something I have no idea how to achieve in Windows.
 
Old 10-19-2020, 02:18 AM   #161
amrs
LQ Newbie
 
Registered: Mar 2020
Posts: 6

Rep: Reputation: Disabled
How about this:

Code:
% got a light?
got: No match.
Note the % prompt, this needs csh (or tcsh). Long ago there was list of this kind of shell funnies but I don't it have any more.
 
Old 10-19-2020, 02:27 AM   #162
resolv_25
Member
 
Registered: Aug 2011
Location: Croatia
Distribution: Debian 10/Ubuntu 20.04
Posts: 64

Rep: Reputation: 15
Password generator

I think that I've found somewhere basic idea, easy password generator from the shell.
This goes to the ~/.bashrc on the Ubuntu or Debian:
Code:
# password generator:
genpasswd() {
   local l=$1
       [ "$l" == "" ] && l=16
       tr -dc A-Za-z0-9*-+!#,.=_ < /dev/urandom | head -c ${l} | xargs
}
Enter in shell:
$ source ~/.bashrc

Then generate your password with:
Code:
$ genpasswd 
zkFwuXnlrF=HwL,9
For a longer password, give a length number as a parameter:
Code:
$ genpasswd 24
BV+7CmX*2wZzXN#,8.Z0fO3*
Move out special characters and leave only A-Za-z0-9 if you want or need only letters and numbers.

And yes, I also love to have history formatted to see exact time when something has been executed, having in the same ~/.bashrc:
Code:
HISTTIMEFORMAT="%d.%m.%y %T "
 
2 members found this post helpful.
Old 10-19-2020, 02:33 AM   #163
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 301

Rep: Reputation: Disabled
For newbies ...
(which I still consider myself to be as well)
Would have been awesome if the poll should have included definitions of the submitted commands, which might actually evoke some interest in the terminal for those who never or hardly ever use it. At my age I'm not interested in learning volumes of terminal commands and the more complex inner working of Linux, but I am interested in using that occasional useful snippet and learning about some of the things that might pertain strictly to the extent of my involvement with Linux.
Been using it full time 7 days per week since 2009, after 18 years with Windows.
Finding myself only going to the terminal about 1% of the time (if that).

.
 
Old 10-19-2020, 02:35 AM   #164
PeterGrootswagers
LQ Newbie
 
Registered: Feb 2017
Posts: 10

Rep: Reputation: Disabled
sudo

sudo make install
 
1 members found this post helpful.
Old 10-19-2020, 03:06 AM   #165
linpi
LQ Newbie
 
Registered: Mar 2018
Posts: 4

Rep: Reputation: Disabled
search trought a comple directory a special string

find . -name "*.php" | xargs grep 'search-string'

or find path -name "*.extension" | xargs grep 'search-string'
 
  


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 10:14 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