In general, use umask 022 if you want everyone to be able to see all of the files and directories that you create, and use umask 077 if you don’t. (You’ll need to put the umask command with the desired mode in one of your startup files to make your new default permissions ...
The ps command has many options. To make things more confusing, you can specify options in three different styles—Unix, BSD, and GNU. Many people find the BSD style to be the most comfortable (perhaps because it involves less typing), so we’ll use the BSD style in this book. Here a...
Now that you have some directories, create some files. There are multiple ways to create files. To create files using shell redirection, refer toHow to manipulate files with shell redirection and pipelines in Linux. You can also create empty files with thetouchcommand. Here are its options and...
“jq” is a command-line processor for Linux. It’s not a text editor, but it can transform a JSON file in different ways.I’ll show you how to use it to prettify your JSON files, but it can also do various tasks on JSON files (filtering, summarizing, inserting values, etc.). Fo...
all is a special target which depends on main.o and function.o, and has the command (from the “manual” steps shown earlier) to make GCC link the two object files into the final executable binary. main.o is a filename target that depends on main.c, and has the command to compile ...
How to create a zip file in LinuxTo create a zip file in Linux, follow the steps below: 1. Open the terminalOpen the terminal by selecting the black rectangle with bright characters on it. Some platforms call it "Konsole," "xTerm," or a similar name. Once the terminal starts, a scre...
How to use the shell command to get the version of Linux Distributions All In One 如何使用 shell 命令获取 Linux 发行版的版本 hostnamectl cat /etc/os-release lsb_release -a Linux Distributions Debian Ubuntu Raspberry Pi OS https://en.wikipedia.org/wiki/Linux_distribution ...
ESC-Return to command mode. :w- Save the file. :q- Quit Vi. :wq- Save and quit. :q!- Quit without saving dd:- Delete the current line. /search_term- Search for text in the file. Viewing Files in Linux You can access files in Linux by using the 'cat' (concatenate) command. ...
How to Unzip a File To unzip a file in Linux, use the command with the item name you want to unpack. Remember that the archive must also be in your current directory. Here is an example: unzip archive_file.zip It will extract theZIParchive content into the current working directory if...
There are several reasons you might want to clear the command history in Linux: Privacy: The command history is stored in a file on your computer, and it can be accessed by anyone who has access to that file. Clearing the command history can help to protect your privacy by preventing othe...