mirror of
https://github.com/balkian/balkian.github.com.git
synced 2024-11-05 03:21:42 +00:00
152 lines
4.0 KiB
HTML
152 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Balkian's site - WELCOME</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../font-awesome/css/all.css">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" media="only screen" href="../../css/main.css">
|
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300|Comfortaa' rel='stylesheet' type='text/css'>
|
|
</head>
|
|
<body>
|
|
<div id="container" class="container">
|
|
<div id="contentwrapper">
|
|
<div id="content">
|
|
<header id="header">
|
|
<ul class="navbar" id="navbar">
|
|
<a href="../../">
|
|
<li >
|
|
<i class="fa fa-home fa-large"></i>
|
|
</li></a>
|
|
|
|
|
|
<a href="../../post/"><li class='' >Blog
|
|
</li></a>
|
|
|
|
<a href="../../tags/"><li class='' >Tags
|
|
</li></a>
|
|
|
|
<a href="../../cheatsheet/"><li class=' active' >Cheatsheets
|
|
</li></a>
|
|
|
|
<a href="../../about/"><li class='' >About
|
|
</li></a>
|
|
|
|
<a href="../../project/"><li class='' >Projects
|
|
</li></a>
|
|
|
|
<a href="//jfernando.es" target="_blank"><li>
|
|
CV
|
|
</li></a>
|
|
</ul>
|
|
</header>
|
|
|
|
|
|
<h2>Linux</h2>
|
|
|
|
|
|
|
|
<h1 id="black-screen-and-lightdm-doesn-t-unlock">Black screen and LightDM doesn’t unlock</h1>
|
|
|
|
<p>Add this to your /etc/lightdm/lightdm.conf file:</p>
|
|
|
|
<pre><code>[LightDM]
|
|
logind-check-graphical=true
|
|
</code></pre>
|
|
|
|
<h1 id="edit-previous-commands">Edit previous commands</h1>
|
|
|
|
<p><code>fc</code> is a shell builtin to list and edit previous commands in an editor.
|
|
In addition to editing a single line (which you can also do with <code>C-x C-e</code>), it also allows you to edit and run several lines at the same time.
|
|
You use it like this:</p>
|
|
|
|
<p>List previous commands</p>
|
|
|
|
<pre><code>$ fc -l
|
|
10259 nvim deploy.sh
|
|
10260* cd ..
|
|
10261* nvim content/cheatsheet/linux.md
|
|
10262 cd
|
|
</code></pre>
|
|
|
|
<p>List commands with date (in zsh)</p>
|
|
|
|
<pre><code>$ fc -ld
|
|
10260* 19:38 cd ..
|
|
10261* 19:38 nvim content/cheatsheet/linux.md
|
|
10262 19:40 cd
|
|
10263 19:40 fc -l
|
|
</code></pre>
|
|
|
|
<p>You can add the date too:</p>
|
|
|
|
<pre><code>$ fc -fld
|
|
10262 1/10/2019 19:40 cd
|
|
10263 1/10/2019 19:40 fc -l
|
|
10264 1/10/2019 19:40 fc -ld
|
|
</code></pre>
|
|
|
|
<p>You can edit a range of commands</p>
|
|
|
|
<pre><code>$ fc 10262 10264
|
|
</code></pre>
|
|
|
|
<p>The range can be relative to the current position, so the previous command is equivalent to:</p>
|
|
|
|
<pre><code>$ fc -3 -1
|
|
</code></pre>
|
|
|
|
<p>If you save and exit, all commands are executed as a script, and it will be added to your history.</p>
|
|
|
|
<p>Source: <a href="https://shapeshed.com/unix-fc/">https://shapeshed.com/unix-fc/</a></p>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="sidebar" class="fixed">
|
|
<div class="toc">
|
|
<h3>Contents:</h3>
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#black-screen-and-lightdm-doesn-t-unlock">Black screen and LightDM doesn’t unlock</a></li>
|
|
<li><a href="#edit-previous-commands">Edit previous commands</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="clear"></div>
|
|
</div>
|
|
<footer class="pagefooter" role="contentinfo">
|
|
<div class="contact">
|
|
<p>
|
|
J. Fernando Sánchez Rada | balkian
|
|
</p>
|
|
</div>
|
|
<ul id="social">
|
|
<li><a href="http://github.com/balkian"><i class="fab fa-github"></i></a></li>
|
|
<li><a href="http://lab.gsi.upm.es/balkian"><i class="fab fa-gitlab"></i></a></li>
|
|
<li><a href="http://twitter.com/balkian"><i class="fab fa-twitter"></i></a></li>
|
|
<li><a href="http://git.sinpapel.es/balkian"><i class="fab fa-git"></i></a></li>
|
|
<li><a href="http://linkedin.com/in/jfsanchezrada"><i class="fab fa-linkedin"></i></a></li>
|
|
</ul>
|
|
<p>
|
|
<i class="fab fa-creative-commons"></i> Creative Commons A-SA-NC
|
|
</p>
|
|
</footer>
|
|
</div>
|
|
|
|
<script src="../../js/jquery-2.0.2.min.js"></script>
|
|
</body>
|
|
</html>
|