Article Tags
Home Technical Articles Development Tools
Summarized the method of removing newline characters in Linux

Summarized the method of removing newline characters in Linux

Today we need to delete the line breaks in the file. For example, there is a file a.txt: 1,2,34,5,61,2,34,5,61,2,34,5,61,2,34,5,61 ,2,34,5,61. Use vim to delete newline characters. vim input command: %s/\n//g2. Use sed command, such as sed':t;N;s/\n//;bt'a. txt result: 1,2,34,5,61,2,34,5,61,2,34,5,61,2,34,5,61,2,34,5,6 Explain: :t definition label"t"btgo to label"t"continue executionN first read a line to

Jan 16, 2024 am 09:06 AM
Linux 删除换行符
How to mount a remote folder on Mac?

How to mount a remote folder on Mac?

This site will share with you how to mount remote folders on Mac. If it solves your current problem, please follow this site and continue reading the following content. let's start! How to add the company LAN folder on Mac. In the system preferences, click the sharing option. Check "File Sharing" to enable LAN file sharing. The name displayed on the LAN is the part before the suffix of the access address under the computer name. In the same LAN, enable win7 folder sharing: (1) Right-click the file to be shared, select "Share", and then select "Specific User"; (2) Select the login username to be shared. 3. First, you need to connect to the router of the LAN. You can choose wired or wireless connection method. Then apply to the network administrator to obtain the IP address, gateway and

Jan 14, 2024 pm 03:33 PM
Mac
CentOS SSH login restricts IP and users

CentOS SSH login restricts IP and users

Setting up SSH under CentOS only allows specific users to log in from specific IPs, and other unauthorized users and IPs cannot log in. Demo environment 192.168.1.81: CentOS6192.168.0.222: Win10192.168.1.135: When Win8.1 does not make any settings, both 192.168.0.222 and 192.168.1.135 can log in to 192.168.1.81. 192.168.0.222192.168.1 .135 Example 1: Only 192.168.0.222 is allowed to log in to 192.168.1.81#vim/etc/hosts.allow. Add the last line: ssh

Jan 14, 2024 pm 03:18 PM
Linux Linux系统 红帽 Linux命令 linux认证 红帽linux linux教程 linux视频
How to quickly launch applications on CentOS 7?

How to quickly launch applications on CentOS 7?

If you have just switched from windows to linux system, you usually need to make the transition through the graphical interface. As the number of installed software increases, especially some programming IDEs, such as JB's software, you have to cdxx/xx/xx/bin every time and then run the script, so it is very troublesome. So I was thinking about whether I could start the application quickly without so much trouble? Programmers who are not lazy are not easy to attack. The following is my idea of ​​​​solving the problem. Let’s go and see it together! Installation tutorials that do not mention the environment are all rogue. TT system: CentOS7 Desktop system version: gnome3.14 Method 1: Shortcut First of all, you will definitely think of desktop shortcuts analogous to Windows, and then you will start goo

Jan 13, 2024 pm 06:54 PM
应用程序 centos7
Detailed explanation of commonly used FAQs in Ubuntu operating system

Detailed explanation of commonly used FAQs in Ubuntu operating system

1. Record how ubuntuserver views crontab logs, crontab record logs, modify rsyslogsudovim/etc/rsyslog.d/50-default.confcron.*/var/log/cron.log#Remove the comment in front of cron, restart rsyslogsudoservicersyslogrestart, view crontab logs less/var/log/cron.log 2. Ubuntu resets the default editor of crontab-e. UbuntuSystemAdmin sets scheduled tasks on the online server.

Jan 12, 2024 pm 02:39 PM
Ubuntu FAQ
How to interchange the ctrl and capslock keys in Linux system?

How to interchange the ctrl and capslock keys in Linux system?

In Linux, I want to swap the capslock key and the ctrl key on the keyboard to facilitate daily input. How to set it up? Let’s take a look at the detailed tutorial below. 1. First, click "Launcher" on the taskbar. 2. Find the terminal in "Launcher" and run it. 3. In the current user's home directory in the terminal, create an .xmodmap file. This file does not exist under Linux by default. If it already exists, skip this step. 4. After the creation is completed, open the file with vim. 5. After opening it with vim, press the i key to enter the editing mode and enter the following content. removeLock=Caps_LockremoveContr

Jan 12, 2024 am 09:09 AM
Linux ctrl capslock
How to delete etc folder on Mac?

How to delete etc folder on Mac?

This article will answer your questions about deleting the etc folder on Mac for your reference. I hope to be helpful! Let’s take a look! How to completely uninstall node on Mac and use npm to uninstall Node. The steps are as follows: first find the programs and functions from the uninstaller, and then restart the computer (or you can manually end the node-related processes in the task manager). Next, find and delete these folders and their contents, if any. You can use the following command to uninstall globally installed modules: npmuninstall-gpackage After uninstalling, you can confirm whether the package still exists in the following ways: 1. Open the command line and enter the /node_modules/ directory to check whether the package

Jan 11, 2024 pm 04:51 PM
mac
How to solve the problem of being unable to connect to the Internet after Centos7 installation

How to solve the problem of being unable to connect to the Internet after Centos7 installation

First enter the directory: /etc/sysconfig/network-scripts/ and then edit ifcfg-ens33. At this time, pay attention to whether you have editing permissions. You can su to enter the root user, use chmod777ifcfg-ens33 to give the file full read and write permissions, then vimifcfg-ens33, enter the command i to enter the editing mode, change ONBOOT=no to ONBOOT=yes, and press esc to enter the command mode, enter: wq! Save and exit, then restart the network: servicenetworkrestart.

Jan 10, 2024 pm 02:49 PM
Server centos7 found
Detailed explanation of how to build Jira service version 6.3.6 on CentOS 7

Detailed explanation of how to build Jira service version 6.3.6 on CentOS 7

Recently, due to project needs, it is necessary to build a software engineering management platform, and Jira is the first choice. There are many tutorials on how to build Jira on the Internet, but after a week of struggling, a completed Jira service has not yet been built. But I finally figured out some ideas, and the jira service was finally successfully built. 1. After entering the root directory of the server, create two directories. The command is: mkdir/softwaremkdir/jiradata 2. This is needed after the file creation is completed. At this time, we need to download the jira6.3.6 installation package from the Internet, and unzip it first to enter /software Command in the directory: wgethttp://www.atlassia

Jan 10, 2024 am 09:46 AM
jira centos7
Replace svn diff with vimdiff: a tool for comparing code

Replace svn diff with vimdiff: a tool for comparing code

Under Linux, it is very difficult to directly use the svndiff command to view code modifications, so I searched for a better solution on the Internet, which is to use vimdiff as a code viewing tool for svndiff, especially for those who are accustomed to using vim. It is very convenient. When using the svndiff command to compare the modifications of a certain file, for example, if you execute the following command: $svndiff-r4420ngx_http_limit_req_module.c, the following command will actually be sent to the default diff program: -u-Lngx_http_limit_req_module.c(revision4420)-Lngx_

Jan 09, 2024 pm 07:54 PM
SVN vimdiff diff
How to pin icons to the taskbar in Ubuntu 18.04

How to pin icons to the taskbar in Ubuntu 18.04

Open the terminal and enter the application management cd~/.local/share/applications/new application icon vim***.desktop (for example: wechat.desktop) #!/usr/bin/envxdg-open[DesktopEntry]Version=1.0Terminal= falseType=ApplicationName=Exec=Icon=NoDisplay=falseStartupWMClass=Where Exec represents the application startup path, and Icon represents the icon path. Then click the Apply button and drag the newly generated application icon to the taskbar.

Jan 08, 2024 pm 11:10 PM
Ubuntu 固定任务栏
Steps to configure static IP in Linux bridge mode

Steps to configure static IP in Linux bridge mode

Introduction: I have been using NAT mode before. During the test, I found that I could not connect to the mysql of the virtual machine remotely from the Android side. However, I succeeded in accessing the mysql of the virtual machine Linux that my classmate copied. I thought the reason was the bridge mode he set. Regarding the difference between the two modes, you can find a lot of articles on the Internet. In layman's terms, in NAT mode, the virtual machine is subordinate to the host, that is, access to the external network must be accessed through the host, so the IP of the virtual machine can only be recognized by the host. . In bridge mode, the virtual machine and the host are in a parallel relationship, share a network card (using multiple interfaces of the network card), and can directly access the external network. Therefore, if you want to remotely access the MySQL of the virtual machine, you need to use bridge mode instead of NAT mode.

Jan 08, 2024 pm 10:30 PM
Linux Linux系统 红帽 Linux命令 linux认证 红帽linux linux教程 linux视频
Redis installation and setup operation guide on CentOS7

Redis installation and setup operation guide on CentOS7

Installation settings Download the tar package: wget-c http://download.redis.io/releases/redis-3.2.4.tar.gz Unzip and install tarzxvfredis-3.2.4.tar.gzmkdir/usr/local/redismakePREFIX=/usr/ local/redisinstall sets the environment variable vim/etc/profileexportREDIS_HOME=/usr/local/redisexportPATH=$PATH:$REDIS_HOME/bin:wqsource/e

Jan 08, 2024 am 11:41 AM
centos7 安装配置 Reids
Tutorial on turning off the sound when starting up an Apple computer

Tutorial on turning off the sound when starting up an Apple computer

When an Apple computer is turned on, there will be a "boom" sound, which is sometimes very scary and meaningless. So how to turn off the sound when the Apple computer turns on? We only need to use the command in the terminal to turn it off. How to turn off the startup sound of an Apple computer: 1. First, click on the "little rocket" button in the dock bar at the bottom. 2. Then open the "Other" folder. 3. Then we open the "Terminal" 4. After opening, we first enter "sudovim/Library/Scripts/sound-off.sh" and press Enter to open the text editor. 5. Then we enter the following command in the text editor (note that the format is maintained). After the input is completed, save the text editor and exit. #!/bin/bashos

Jan 07, 2024 pm 10:46 PM

Hot tools Tags

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use