Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- shell



  Differences between bashrc and profile in Linux

After login to a Linux system, the command console will show up with a prompt label such as # or ~, a shell command can be typed after this prompt and the system can execute the command thereafter. All these operations are handled by shell. Shell is a command language interpreter that executes commands read from the standard input device (keyboard) or from a file. There are different types of shells such as bash, ksh, csh etc. The most commonly used of them is bash and it's also the de...

   LINUX,PROFILE,BASH,BASHRC,.BASHRC,.PROFILE     2016-11-05 22:17:51

  Add Sublime Text to your context menu on right click

When opening a text file, you may be used to right click on the file to be opened and then choose the application which can open the file from the context menu. On the context menu, you may see a menu item like "Edit with Notepad++". Nowadays many people especially programmers like to use Sublime Text, but by default this application will not show on the context menu when you right click on a file. There is now frequent request to add this application to the context menu. Here we show a simple b...

   SUBLIME TEXT,CONTEXT MENU,WINDOWS     2015-10-19 08:51:25

  Using vi key bindings in bash and zsh

Takeaway: If you prefer to use vi or vim for command-line editing, you can configure shells to use vi key bindings instead of emacs-style key bindings. Here’s how. By default, most shells use emacs-style key bindings for command-line editing and modification. For users of vi or vim, however, you can instead configure shells to use vi key bindings instead. This is done by editing ~/.bashrc in the case of bash, or ~/.zshrc in zsh a...

   vi,Linux,Zsh,bash,key binding     2012-02-07 06:22:36

  /dev/null and /dev/tty in Linux

In Linux, there are two special files /dev/null and /dev/tty. /dev/null will drop all the data written to it, i.e, when program writes data to this file, it means the program has completed the data write operation. But in  fact it does nothing, if you just want the status of a command but not the output of a command, this feature will be very useful. See below shell codes:     /> vi test_dev_null.sh        #!/bin/bash    if grep...

   Linux,/dev/null,/dev/tty     2013-03-04 02:23:23

  Something you may not know about Shell

Shell is also called command line interface, it is the interface between *nix users and computer. Shell is a program which provides service to access OS kernel services. This article is to introduce some not so well known but useful and interesting knowledge about shell. Wiki shell was born almost at the same time as Unix. The first UNIX shell was written by Ken Thompson in 1971 and its name is Thompson sh. It's older than Linux kernel. The default Shell in most *nix and MacOS is bash, bash was...

   Linux, Unix,Shell,Command     2012-11-24 07:19:47

  Guide to Implement an SSH Client Using Golang

SSH, short for Secure Shell, is a network protocol used for securely remote logging into other computers on a network. I believe most backend developers are familiar with SSH. Common shell tools used for logging into servers, such as Xshell, SecureCRT, and iTerm2, are all based on the SSH protocol. In Golang, the crypto/ssh package provides functionality for implementing an SSH client. In this article, we will explain in detail how to implement an SSH client using Golang. Creating SSH Client Con...

   SSH CLIENT,GUIDE,SSH,GOLANG     2023-11-11 09:19:29

  Server monitoring shell scripts

There are many open source server monitoring software such as cacti and nagios. Besides these, can we write our own shell scripts to monitor them? The shell scripts written by ourselves can fulfill our special requirements better and have a more detailed coverage. Below are some commonly used shell scripts used by Evangelist, an Oracle DBA. 1. Check network gateway traffic #!/bin/bash #network #Mike.Xu while : ; do time='date +%m"-"%d" "%k":"%M' day='date +%m"-"%d' rx_before='...

   Server monitor,CPU,memory,shell     2013-08-30 21:56:14

  SSH Security and You - /bin/false is *not* security

Backstory While at RIT around 2004 or 2005, I discovered that a few important machines at the datacenter allowed all students, faculty, and staff to authenticate against them via ssh. Everyone's shells appear to be set to /bin/false (or some derivative) on said machines, so the only thing you'll see after you authenticate is the login banner and your connection will close. I thought to myself, "Fine, no shell for me. I wonder if port forwarding works?" ...

   Linux,Security,/bin/false,SSH     2012-02-06 07:46:29

  37 powerful Linux shell commands

To work on Linux platform, you cannot avoid using shell commands to complete some tasks. These tasks can be as simple as list files in some directories or find some text in some file, or can be as complex as monitoring processes. In this post, we will share 37 powerful Linux shell commands.   Task Commands 1 Delete file with 0 byte(empty file) find . -type f -size 0 -exec rm -rf {} \;find . type f -size 0 -delete 2 Check process memory consumption ps -e -o "%C : %p : %z : %a"|sort -k...

   Linux command,List     2013-09-16 07:47:16

  Bash Shell Scripting - 10 Seconds Guide

This Bash shell scripting guide is not a detailed study but a quick reference to the BASH syntax. So lets begin... Common environment variables PATH - Sets the search path for any executable command. Similar to the PATH variable in MSDOS. HOME - Home directory of the user. MAIL - Contains the path to the location where mail addressed to the user is stored. IFS - Contains a string of characters which are used as word seperators in the command line. The string normally consists of the spac...

   Bash,Shell,Linux,Tutorial,10 seconds,Shortcut key     2012-02-28 08:05:41