background preloader

Bash Hackers Wiki Frontpage

Bash Hackers Wiki Frontpage
Related:  Systèmes et IT

7 Linux Shell Tips For Increased Productivity Love it or hate it, the command line is here to stay. Sure, there are new options emerging like TermKit but it’s unlikely that the command line will ever really go away. Those who take the time to master it can run productivity circles around their peers, but with the astonishing assortment of CLI tools available, where do you even begin? There are several reasons to make a temporary RAM-based filesystem such as fast read/write times or to guarantee that the files will not persist after reboot. Where /mytemppartion is the location you wish to mount (it must already exist) and 1024m is the desired size of the ramdisk. Linux pros almost certainly know the at command, it lets you set a specific time for a job to be run. If you want to verify that it worked, you can easily list the sceduled jobs with Perhaps you ran a long complicated command, but forgot to preface it with sudo, or maybe you didn’t add some necessary options to the end. to see just such a list.

共通テーマ: 実例でわかる awk: 第 1 回 awk を擁護する この連載記事を通して、皆さんに熟練した awk プログラマーになってもらいたいと思います。awk とは、けっしてかわいくもないし、特にかっこいい名前でもありません。GNU 版の awk の名前である gawk に至っては明らかに変な名前 (訳注: gawk は英語で「のろま」「気の利かない人」等の意味があります) です。この言語になじみのない人であれば「awk」と聞くと、非常に知識の豊富な UNIX の第一人者でさえも頭がおかしくなりそうなほどの (そしてコーヒーを淹れに行きながら、繰り返し「kill -9!」 確かに、awk は立派な名前ではありません。 上に戻る awk の第1歩 では awk で遊びながら、その仕組みを見てみましょう。 $ awk '{ print }' /etc/passwd 画面に /etc/passwd ファイルの内容が表示されるはずです。 ここに、最初の例とまったく同じ動作をする awk の別の例をご紹介します。 $ awk '{ print $0 }' /etc/passwd 変数 $0 は現在行全体を意味するので、print と print $0 はまったく同じ動作となります。 $ awk '{ print "" }' /etc/passwd print コマンドにストリング ““ を指定すると、ブランク行が出力されます。 $ awk '{ print "hiya" }' /etc/passwd このスクリプトを実行すると、画面が hiya で埋まります。 複数フィールド awk は、複数の論理フィールドに分割されたテキストの処理が得意であり、awk のスクリプトの中から各フィールドを容易に参照することができます。 $ awk -F":" '{ print $1 }' /etc/passwd 上の例では -F オプションを使用して、”:” をフィールド区切り文字に指定しています。 $ awk -F":" '{ print $1 $3 }' /etc/passwd 以下に示すのは、このスクリプトで作成される出力の抜粋です。 halt7 operator11 root0 shutdown6 sync5 bin1 ....etc. $ awk -F":" '{ print $1 " " $3 }' /etc/passwd 出力は次のようになります。 外部スクリプト

Help Manual - Software Changing Desktop Environments Change Repository Location Creating and Extracting compressed files File Encryption Getting Software Installing Software Linux Equivalents of Windows Programs Lite Software - Install Software Lite Software - Remove Software Lite Sources Lite Tweaks - Bootup Fix - Clear Memory - Default Web Browser - Hibernate, Suspend Lite Updates Notify PPA - Adding PPA - Removing Software Updates Country Location Uninstalling Software Updates Wine - Run Windows programs Getting Software Getting software on Linux is easier than on Windows. There are a few common methods for installing and removing software. IMPORTANT: Before you run Install/Remove Software for the first time, read this first. Installing Software 1. 2. type in your search query. 3. 4. 5. 6. Uninstalling Software 1. 2. Top of page Updates Keeping Linux Lite up to date is a simple process. At the top of Menu, Favorites, you will see Install Updates. We've made the update process as simple as possible. 1. 2. 3.

Crazy POWERFUL Bash Prompt From setting the window title to show the last run command (filtered), saving your history and keeping multi-session history intact, resetting the color/cursor/highlighting of errant color-emitting commands, these 2 prompt examples do more than meet the eye and are extremely fast. Don't have much time or just don't care? No problem, this is a simple copy and paste... here's one to start (all 1 line, just cut and paste right into the shell, once you've made sure its safe). Basic POWER PROMPT ^ PROMPT_COMMAND='history -a;echo -en "\033[m\033[38;5;2m"$(( `sed -n "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/1024))"\033[38;5;22m/"$((`sed -n "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo`/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"' \ PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!) Extreme Power Prompt ^

Linux の 101 試験対策: Linux コマンドライン 概要 この記事では、bash シェルの主要な機能の一部を簡単に紹介し、以下のトピックを取り上げます。 コマンドラインを使用して行う、シェルとコマンドとの対話有効なコマンドおよびコマンド・シーケンスの使用環境変数の定義、変更、参照、およびエクスポートコマンド履歴へのアクセスと編集機能パスに含まれるコマンドと含まれないコマンドの呼び出しman (マニュアル) ページを使用したコマンドの検索 この記事は、Junior Level Administration (LPIC-1) 101 試験における主題 103 の 103.1 の試験対策となります。 bash シェル bash シェルは Linux に用意されているシェルのうちの 1 つです。 bash の詳細を掘り下げる前に、シェルはコマンドを受け入れて実行するプログラムであることを思い出してください。 シェルには、cd、break、exec などの組み込みコマンドがあります。 シェルも以下の 3 つの標準入出力ストリームを使用します。 stdin。 入力ストリームがプログラムに提供する入力は、通常は端末のキー・ストロークによるものです。 記事ではこれ以降、読者がシェル・プロンプトを起動する方法を知っていることを前提とします。 グラフィカル・デスクトップを使わずに Linux システムを使用している場合、またはグラフィカル・デスクトップ上でターミナル・ウィンドウを開いた場合、リスト 1 に記載するようなプロンプトが表示されるはずです。 リスト 1. [db2inst1@echidna db2inst1]$ ian@lyrebird:~> $ root ユーザー (スーパーユーザー) としてログインした場合には、リスト 2 のようなプロンプトが表示されます。 リスト 2. [root@echidna ~]# lyrebird:~ # # root ユーザーにはかなりの権限があるため、慎重に使用してください。 この連載に記載するサンプル・コードは、実際の Linux システムのデフォルト・プロンプトを使用した場合のコードをカット・アンド・ペーストしたものです。 上に戻る コマンドおよびシーケンス プロンプトが表示されたところで、今度はこのプロンプトで何ができるかを見ていきましょう。 行に # 文字が含まれている場合、その行の残りすべての文字は無視されます。 echo !

Customize your internet with an open source search engine A long time ago, the internet was small enough to be indexed by a few people who gathered the names and locations of all websites and listed them each by topic on a page or in a printed book. As the World Wide Web network grew, the "web rings" convention developed, in which sites with a similar theme or topic or sensibility banded together to form a circular path to each member. A visitor to any site in the ring could click a button to proceed to the next or previous site in the ring to discover new sites relevant to their interest. Then for a while, it seemed the internet outgrew itself. Everyone was online, there was a lot of redundancy and spam, and there was no way to find anything. Why choose an open source alternative? Search engines like Google and DuckDuckGo are demonstrably effective. But maybe you prefer not to use Google or DuckDuckGo because of privacy concerns or because you're looking to contribute to an effort to make the internet more independent. Install YaCy

Shell startup scripts — flowblok’s blog If you’re a regular shell user, you’ve almost certainly got a .bash_profile or .bashrc script in your home folder, which usually contains various tweaks, such as setting environment variables (adding that directory to $PATH), telling your shell to do clever things (like set -o noclobber) and adding various aliases to commands (like alias please=sudo). (If you’re really organised, you’ll have all your dotfiles in a repository somewhere so that you can keep your settings synchronised across all the machines you work on.) Anyhow, I suspect that few people know when things like .bash_profile and .bashrc actually get executed. When I started, I just followed people’s advice of putting stuff in .bashrc, and then when it didn’t work, into .bash_profile. My solution to this problem is to define some new dotfile folders, one for each shell (.bash/, .zsh/ and .sh/), and one for the shell-independent files (.shell/): “But!” Where to put stuff It all depends on when it needs to be run. Implementation

Create web user interfaces with Qt WebAssembly instead of JavaScript When I first heard about WebAssembly and the possibility of creating web user interfaces with Qt, just like I would in ordinary C++, I decided to take a deeper look at the technology. My open source project Pythonic is completely Python-based (PyQt), and I use C++ at work; therefore, this minimal, straightforward WebAssembly tutorial uses Python on the backend and C++ Qt WebAssembly for the frontend. It is aimed at programmers who, like me, are not familiar with web development. git clone cd wasm_qt_example python mysite.py Then visit with your favorite browser. What is WebAssembly? WebAssembly (often shortened to Wasm) is designed primarily to execute portable binary code in web applications to achieve high-execution performance. Toolchain There is a getting started guide on the Qt wiki. To get executable WebAssembly code, simply pass your Qt C++ application through Emscripten. #! The versions on my (Fedora 30) build system are:

Create a First-Person Shooter In Godot – Part 1 – Godot Tutorials Introduction Welcome to the tutorial, and get ready to learn some in-demand skills for creating first-person shooter games! Throughout this tutorial, we will work with the 3D aspects of the Godot game engine to enhance your foundations when it comes to action game development. Additionally, we’ll be creating a first-person shooter from scratch, which will show you how to set up the FPS player and camera, enemies, efficient shooting mechanics, health and ammo pickups, and more. Before we begin, it’s important to know that a basic understanding of the Godot engine is required. Project Files For this project, we’ll be using a handful of pre-made assets such as models and textures. You can download the assets for the project here.You can download the complete FPS project here. Improve the security of your multiplayer networks by adding user authentication to your games. Player Authentication with Azure PlayFab Let’s Begin To begin, create a new Godot project. Building Our Environment

Latacora - Stop Using Encrypted Email Email is unsafe and cannot be made safe. The tools we have today to encrypt email are badly flawed. Even if those flaws were fixed, email would remain unsafe. Its problems cannot plausibly be mitigated. Avoid encrypted email. Technologists hate this argument. Most email encryption on the Internet is performative, done as a status signal or show of solidarity. But we have to consider more than the LARP cases. The least interesting problems with encrypted email have to do with PGP. Here’s why. If messages can be sent in plaintext, they will be sent in plaintext. Email is end-to-end unencrypted [1] by default. The clearest example of this problem is something every user of encrypted email has seen: the inevitable unencrypted reply. Even if modern email tools didn’t make it difficult to encrypt messages, the Internet email system would still be designed to expect plaintext. Serious secure messengers foreclose on this possibility. Metadata is as important as content, and email leaks it.

Hackers Were Inside Citrix for Five Months Networking software giant Citrix Systems says malicious hackers were inside its networks for five months between 2018 and 2019, making off with personal and financial data on company employees, contractors, interns, job candidates and their dependents. The disclosure comes almost a year after Citrix acknowledged that digital intruders had broken in by probing its employee accounts for weak passwords. Citrix provides software used by hundreds of thousands of clients worldwide, including most of the Fortune 100 companies. It is perhaps best known for selling virtual private networking (VPN) software that lets users remotely access networks and computers over an encrypted connection. In March 2019, the Federal Bureau of Investigation (FBI) alerted Citrix they had reason to believe cybercriminals had gained access to the company’s internal network. But in a letter sent to affected individuals dated Feb. 10, 2020, Citrix disclosed additional details about the incident.

Related: