JeffVSJeff wrote: dito yata dapat to boss dark , move ko na lng sa thread ni boss froilandr
boss dark , ok na, thanks sa support , ini-update ko na lng firefox ko 17.0 , outdated pala ,di ko napansin kase cd version nga pala ung dl ko ,
nga pala boss, may isa kong kong problema pala eh , un kaseng squidbox ko minimal install lang kase ung centOs ko dun , ithink 5.9 or below pa un matagal na kase eh , bale may times kase na pag nag uupdate ako andun din kase apache at mysql, eh nahihirapan ako boss sa kakahintay , hindi ko alam pano mag run ng two or more commands at the same time ,kase wala naman sya interface na pwde mo open kahit ila di ba ? plain black screen lang talga kase eh, minsan pag in a hurry ako gusto ko sana ung parang magoopen ka ng second terminal para makapagpatkbo ka pa ng isang commands, thanks
sir nasa terminal ang strength nang unix/linux, napakaraming options na pwede mo gawin ang multiple cli applications, ako nga gumagamit lang nang Xdesktop gui kapag kailangan ko nang firefox(dahil java,flash,css/html5 support), pero madalas sa commandline lang ako para tipid sa cpu resources(celeron 800mhz lang kasi pc ko sa bahay hehe)
pero kahit sa cli lang walang Xserver gui, nakakapag run ako mutiple terminals,irssi (irc)chat, watch movie(mplayer,vlc,xine), watch tv(mplayer), watch youtube(vlc), play mp3 (mocp), web browse(links -g,lynx), lahat yan nagagawa ko nang sabay sabay sa cli using gnu screen, nasanay kasi ako sa cli lang kasi yung first time use ko sa linux walang ring X kasi 32mb zipslack yun lang kaya ko download sa dialup hehe
pag open ko nang pc at login ko automatic yan una ko execute screen then vi ,
option 1 use gnu screen, pwede ka mag copy paste between multiple terminals sa screen, sa vi pwede rin may terminal plugins din
option 2 sir kung ayaw mo sa screen, pwede mo gamitin yung 6 virtual cli terminal sa linux tty1-tty6
press mo lang alt+F1 to F6
option 3 sir pwede ka gumamit emacs supported din nya multiple terminals, hindi ako gumagamit nito sir kasi vi user ako, meron kasing two camps yang unix users, vi vs emacs simula pa nung 1970's
option 4 pwede ka gumamit tmux same sa screen kaso kailangan mo pa ito download and install, hindi rin ako gumagamit nito kasi screen user ako
option 5 sir run mo yung commands sa background , lagyan mo lang nang & , or multiple commands with &&, pwede rin ; kung gusto mo sabay sabay, pero applicable lang ito kung hindi mo kailangan makia yung verbose output( pwede ka rin gumamit nang output to file)
example gusto mo run nang sabay yung wget (download a file) at scp (transfer a file) at yum (update) at rm (delete a directory)
kapag & ang ginamit mo, isa isa mo execute after the other,example:
wget download.3gp &
press enter then next command kahit hindi pa tapos yung download
scp file.txt 192.168.1.1:/home &
press enter then next command .....
kapag && naman isang line lang silang lahat pero hihintayin nya muna matapos yung unang command bago execute yung next, example:
wget download.3gp && scp file.txt 192.168.1.1:/home && yum update && rm -rf /home/user
kapag ; naman sabay sabay nya execute kahit hindi pa tapos yung unang command
wget download.3gp ; scp file.txt 192.168.1.1:/home ; yum update ; rm -rf /home/user
yung | (pipe) naman gagamitin nya yung output nang previous command sa next command, example:
create tayo file
echo 1 one >> test.txt && echo 2 two >> test.txt && echo 3 three >> test.txt
ang output nang test.txt
1 one
2 two
3 three
using pipes, pwede natin kunin yun 2nd line lang, example:
cat test.txt | grep 2
ang output nya
2 two
yan sir linux commands basics, kung kailang mo help sa pag gamit nang screen or vi, post mo lang
or sa awk , sed, bash scripting, next post nalang siguro medyo mahabang usapan yun hehe, may awk vs sed seperate camps din kasi ang unix users (awk user ako)