日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > linux >内容正文

linux

linux点滴

發(fā)布時(shí)間:2025/3/20 linux 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux点滴 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

為什么80%的碼農(nóng)都做不了架構(gòu)師?>>> ??

在Linux中怎么把用戶添加到組中?

添加用戶test,初始密碼123456,該用戶的主目錄為/home/share,用戶的基本組為root,用戶的shell為/bin/tcsh,要求將該用戶加到mail和new組中。

useradd -m -d /home/share -g root -s /bin/tcsh test #建立test用戶 passwd test #系統(tǒng)會(huì)提示你為test輸入密碼 你輸入123456 回車即可 usermod -G mail -a test #加入mail組 usermod -G new -a test #加入new組 #usermod -G new test (2013年8月26日22:01:00,昨晚我用這句執(zhí)行害我丟了 sudo 組,而我又沒(méi)激活 root 帳號(hào),花費(fèi)一個(gè)多小時(shí)查資料才解決)

更改文件權(quán)限

chmod -R 775 filename #(linux中所有都是文件,dir)

ubuntu設(shè)定默認(rèn)關(guān)聯(lián)程序

右鍵點(diǎn)擊所需要關(guān)聯(lián)打開(kāi)方式的文件,選擇“屬性” ,“打開(kāi)方式” 即可以選擇默認(rèn)打開(kāi)的程序

要進(jìn)入可執(zhí)行文件的目錄,比如 rails

cd $(dirname $(which rails))

ubuntu terminal 顯示路徑太長(zhǎng),怎么設(shè)置變短

$: vi ~/.bashrc

這個(gè)文件記錄了用戶終端配置 找到

if [ "$color_prompt " = yes ]; thenPS1 ='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W \[\033[00m\]\$ ' elsePS1 ='${debian_chroot:+($debian_chroot)}\u@\h:\------這里------>W<------這里------\$'

將w由小寫(xiě)改成大寫(xiě),可以表示只顯示當(dāng)前目錄名稱.

代碼行數(shù)分析

代碼行數(shù)分析工具 sloccount

類似 win8 的合并目錄,而不是替換

ditto from_folder destination_folder

http://superuser.com/questions/117621/how-to-merge-and-not-replace-folders-when-copying-on-the-mac

z - jump around

記錄目錄使用的頻率,快速選擇、跳轉(zhuǎn)

https://github.com/rupa/zhttps://github.com/rupa/z

The 10 most used commands stored in your history

history | sed -e 's/ *[0-9][0-9]* *//' | sort | uniq -c | sort -rn | head -10

This gives you the most used command line entries by removing the history number (sed), counting (sort | uniq -c), sorting by frequency (sort -rn) and showing only the top ten entries.

If you just want the commands alone:

history | awk '{print $2;}' | sort | uniq -c | sort -rn | head -10

Both of these strip the history number. Currently, I have no idea, how to achieve that in one line.

轉(zhuǎn)載于:https://my.oschina.net/xieyunzi/blog/160746

總結(jié)

以上是生活随笔為你收集整理的linux点滴的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。