riv123 Posted April 23, 2012 Share Posted April 23, 2012 Did you know? history or fc -l commands can show your bash command line history or recall the history stored in ~/.bash_history file. You can make history to ignore the commands if it begin with a space:whistoryfc -l ## run who command with a space ##export HISTIGNORE="[ \t]*" whohistory The HISTIGNORE shell variable controls which command lines should be saved (i.e. ignored) on the history list. To ignore duplicate commands in history, enter:export HISTIGNORE="&" You can define a colon-separated list of patterns to ignore ls command, duplicate commands, and ignore the commands if it begin with a space, enter:export HISTIGNORE="ls:&:[ \t]*"historylsdatedatecalhistory As a sys admin you may want to ignore the frequently used commands such as - ls, pwd, cd, mount, umount, clear, exit, and much more from your history.export HISTIGNORE="ls:&:[ \t]*:cd:mount:umount:clear:exit:pwd:date" See bash man page for more info:man bashhelp history Quote Link to comment
riv123 Posted April 26, 2012 Share Posted April 26, 2012 Simple script to list all active and system users. ------------------------[cut]------------------#!/bin/bash_l="/etc/login.defs"_p="/etc/passwd" ## get mini UID limit ##l=$(grep "^UID_MIN" $_l) ## get max UID limit ##l1=$(grep "^UID_MAX" $_l) ## use awk to print if UID >= $MIN and UID <= $MAX and shell is not /sbin/nologin ##echo "----------[ Normal User Accounts ]---------------"awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{ if ( $3 >= min && $3 <= max && $7 != "/sbin/nologin" ) print $0 }' "$_p" echo ""echo "----------[ System User Accounts ]---------------"awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{ if ( !($3 >= min && $3 <= max && $7 != "/sbin/nologin")) print $0 }' "$_p" -----------------------[stop]----------------- Quote Link to comment
riv123 Posted April 27, 2012 Share Posted April 27, 2012 To removal ALL the files and not any subdirectories in /dest type the followingfind /dest -type f -delete To removal only the files and ot any subdirectories in /dest type the following:find /dest -maxdepth 1 -type f -delete The -delete option will only work on the modern Unix like systems. For older systems try shell loops or pipes or pipes via xargsfind /dest -type f -print0 | xargs -I{} -0 rm {} Quote Link to comment
riv123 Posted April 27, 2012 Share Posted April 27, 2012 Want to find how many files an application is using..? Run: lsof +c 0 | cut -d' ' -f1 | sort | uniq -c Quote Link to comment
riv123 Posted April 30, 2012 Share Posted April 30, 2012 If you know vim or vi and use it on a daily basis and you will like this funny game http://vim-adventures.com/ Quote Link to comment
riv123 Posted July 9, 2012 Share Posted July 9, 2012 Want a quick web server running without installing Apache to grab some files from your $HOME? Try: ssh user@server1cd /path/to/dirpython -m SimpleHTTPServer Fire a browser and type:http://server1:8000 When done press CTRL+C and exit from ssh session. PS: you can also use nc Quote Link to comment
hitokiri_3020 Posted December 15, 2012 Share Posted December 15, 2012 masters need help, i'm using linux mint nadia, i installed wine to use vegas 7, pero di ko ma-install yung dotnet framework ng maayos, any tips or suggestions mga master. TIA Quote Link to comment
Orgasm Donor Posted April 7, 2017 Share Posted April 7, 2017 how much is the linux software Quote Link to comment
RƐX Posted April 15, 2017 Share Posted April 15, 2017 Always wanted to "master" Linux but I can never have the time. Kaya naging script-kiddie na lang ako kapag may kailangan ako gawin sa Linux support box namin Quote Link to comment
itikbitik Posted May 9, 2017 Share Posted May 9, 2017 how much is the linux software free Quote Link to comment
Asus19 Posted August 9, 2017 Share Posted August 9, 2017 how much is the linux software Free. (Feel free to choose wide variety of distros such as Ubuntu, Mint, Elementary, OpenSuse, Puppy, etc.) Perfect for old computers (even modern computer) lightweight, easy to use (unlike before....bashing sudoing all the way). Pero may ibang linux na may bayad, perfect for enterprise level (Red Hat, etc._ Quote Link to comment
Captain Guile Posted March 16, 2018 Share Posted March 16, 2018 free wow! its good to hear that Quote Link to comment
K0RN - RETIR3D Posted February 25, 2019 Share Posted February 25, 2019 Linux User here at work. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.