February 10, 2007
as known pressing tabs in the Command Line Interface will complete commands or filenames for you, it's a very nice feature in bash, i don't remember most of the commands without this feature, but does this feature need to enhance? when you write
cd [tab] then bash will list all files and directories in the directory you are working in, but you just need the directories to be listed.
Imagine typing ssh [Tab] and being able to complete on hosts from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a list of all string handling functions in the UNIX manual.
you can do many things like that with bash built in commands like
complete for example:
complete -d pushd -C cdnow when you use
cd [tab] then the directories should be listed....
there is a nice tool named bash-completion
that combines a lot of nice completion features, in slackware you can find it in the extra folder. i dont know about the other distributions but you can find it here, after you install it, you have to source it with ./etc/bash_completion command or you can put it into your ~/.bashrc file by writing some something like this in it
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
Have Fun!
Posted in bash No Comments »
February 9, 2007
i found a nice case study talking about
Network booting, VNC, and SSL cooperate to yield big benefits...
You've heard of Web 2.0, right? Well, here's "utility computing 2.0," a combination of network booting, SSL, VNC, and other familiar concepts and technologies -- all on Linux® -- that can yield dramatic returns on investment. See how the University of California set up a server farm environment to provide secure remote desktop application services for students.
continue reading at
IBM developerWorks
Type rest of the post here
Posted in Linux others.. No Comments »
January 22, 2007
YES, i did it, waw what a nice feeling... i finished the damn Univ. OOOOOOOOOhhhhh yes iam so happy, but the counter is just started... any way its a nice feeling to reach the end of this mession... Tick Tock 🙂
Posted in Scripting & CLI No Comments »
January 2, 2007
5.5 years in the damn university, as i said before and like what i say just now, I AM A DAMN DUMP PERSON,
how is every body graduated?? i don't know how to do it!!, summer semester was the last one in the university but i failed, now its a second last semester AND I DON'T WANT TO FAIL,
i really want to finish this damn story, i want to close this paper,
ok on this day 2/1/2007 11:52pm i promise my self not to enter the internet, or touch the computer until 17/1/2007 🙁
i really want to PASS... DAMN
PUBLISH
Posted in Life No Comments »
January 1, 2007
في رثاء سيد الشرفاء الرئيس الشهيد(بإذن الله) صدام حسين
عجز اللسان عن البيان
وشلت من بعدك الأركان
فكيف يرثي الأموات أحيائهم
وكيف يصحو العالم السكران
تلعثمت أقلامنا وتجمدت
أبصارنا وضاعت الأذهان
راحت قلوبنا حزنا على فقدك
وما عاد في الأرض إنسان
وما عاد في الأرض إلا
أكوام قش أكلتها النيران
وعالم يجيد الرقص فوق القبور
والشعور بنشوة أسبابها النسيان
وحكام في جحور الذعر
من شعبهم.. والشعب جبان!
فأنى يحيى الشعب
والشعب ألحد بالثورة وراقه الهوان
صدام يا سيد الأحرار
هنيئا لك ..فقد سترك التراب وأدفتك أكفان
لكننا لا زلنا في العراء عرضة
وأجهزة للطم يتسلى بها الطغيان
صدام..يا آخر الشرفاء
هنيئا لك الشهادة.. في زمن..يفطس به السلطان
وتملئ ريح جيفه كل الأنوف
وريح مسكك الشريف تعشقها الأبدان
هنيئا لك بالرجولة في زمن الأخناث
وحكامنا عشرون جنسا لا يدري بها الإنسان
منهم اللوطي..وآخر له الأثداء
ما لهم أشناب ولا أزبان
حلس..ملط تغريك أجسادهم
كلوحة رسمها فنان
خطو دروب الذل لأنفسهم
مهرولين لشرب ما خنه الأمريكان
صدام ماذا أقول فيك
تصدعت من لوعتي الجدران
يا رمز الإباء في زمن الأذلاء
يا أمة أنت ..أنت السنان
لن تعزف القيثارة من بعدك
سوى ألم وأشجان
ولن تنشد الطيور
فقد ماتت الألحان
الأرض من بعدك بيت دعارة
وسمائها جالت بها الغربان
أنت الشريف رغم أنف كل قوال
أنت الغول..في زمن قرضته الجرذان
يا من ضجت تل أبيب خوفا
من رمحه الناري والرنان
وغرست ابتسامة الأفراح
بأفواه جرحى فلسطين
ستبكيك أرضنا علناً
على مرئ عالم شابه الذل والهوان
مت رافع الرأس حراً كريماً
فلست ممن طواه الأمريكان
ولست ممن حط رأسه بين أفخاذهم
فلا يخرج إلا و أغرقه الهذيان
سأصلب الحكام يوما
وأطأ رقابهم بنعلي الجوعان
فليغرق العالم من بعدك يا أيها الربان
فما جدوى سفينة ليس لها قبطان؟
بقلم: ثائر
بتاريخ استشهاد الرئيس الرمز صدام حسين المجيد
لكل انسان من اسمه نصيب.. وانت مجيد يا صدام
Posted in Life No Comments »
January 1, 2007
ya i am stupid, ya i am that dump person, ya i am not that person who know every thing, i still learn...
from 6 month ago i started discovering Arab IT sites, something awful specially the forums... every body want to say "i am the one, i know every thing, no body can..." WHY??? one of this examples was " why you cant write in the wiki? " so Why? the answer should be "how the others will know that this was wrote by me!!" huh... another thing ya salam 3allah el 3onsoryah MmmMm... before i 4get, there is another thing, they are Nominated and Positions LOVER... you know the tail of the story...
one site was good its arabeyes (at least in my view), and where is the other sites? huh, we cant respect the others, we cant work together...
it was a bad trial... i will back to my corner... not more than a visitor... lets we back to the reality...
nifty night...
Posted in Life No Comments »
December 30, 2006
he is a hero, ya he is a hero..
every thing they said about you is wrong, but we are arab!
رحمة الله عليك ايها البطل الشهيد
Lives in our heart for ever SADDAM
Posted in Life 1 Comment »
December 19, 2006
bash loging, startup scripts and shell initialization files..
ok, i will talk about bash,
When a user logs in, environment variables are set from various places.
startup scripts in order is like this:
- /etc/passwd
- /etc/shadow
- /etc/group
- /etc/profile will run.
- then all the files (that end with sh) in the /etc/profile.d directory
- then bash will look for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. (i.e if ~/.bash_profile is not exists then bash will look for ~/.bash_login then ~/.profile and sources that instead). may be ~/.bash_profile source ~/.bash_login and ~/.bashrc in it.
- ~/.bashrc might point to /etc/bashrc
- at logout ~/.bash_logout may run
- bash command history are kept in ~/.bash_history
some of this scripts may not exists in your system (~/.bash_profile, ~/.bash_login, ~/.profile, ~/.bashrc, /etc/bashrc and and ~/.bash_logout),
lets we explain them:
1. /etc/passwd
/etc/passwd file contains basic user attributes. This is an ASCII file that contains an entry for each user. Each entry defines the basic attributes applied to a user.
An entry in the /etc/passwd file has the following form (one entry per line):
Name:Password:UserID:PrincipleGroup:Gecos:HomeDirectory:Shell
For security reasons, most Linux Distributions no longer store password in this file (store it in /etc/shadow).
A corrupt /etc/passwd file can easily render a Linux box unusable.
for more info about /etc/passwd see:
manpages: man passwd
2. /etc/shadow
shadow contains the encrypted password information for user's accounts and optional the password aging information (other information such as account or password expiration values, etc).
for more info:
manpages: man shadow
http://db.assam-glug.org/documentations/Linux-admin-made-easy/shadow-file-formats.html
3. /etc/group
/etc/group is an ASCII file which defines the groups to which users belong. There is one entry per line, and each line has the format:
group_name:passwd:GID:user1,user2,user3....userN
as you see, you have to sperate each user with comma.
for more info see:
manpages: man group
4. /etc/profile
/etc/profile file contains system wide environment stuff and startup programs, all settings that you want to apply to all your users environments should be in this file.
5. /etc/profile.d/*.sh
/etc/profile.d is a good place to put application specific settings and their environment variables.
6. ~/.bash_profile, ~/.bash_login, and ~/.profile
they can be used like /etc/profile file but for a specific user... they are user-specific bash environmental default settings, contains extra configuration options or change default settings.
bash will look for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
~/.profile is good when use another shell (like csh) that will not understand bash command and will look for this file.
* ~/.bashrc
this file used for user-specific aliases, export and user functions.
~/.bashrc might point to /etc/bashrc to run global things.
finaly may be you would like to know that when you create a new user, then the home directory for that user will initialised with files from the /etc/skel directory (i.e /etc/skel directory contains subdirectories and files used to populate a new user's home directory). The system administrator can create files in /etc/skel/ directory that will provide a default environment for users.
i dont know a good site talking about that, but take a look at this one:
http://www.faqs.org/docs/linux_admin/x2331.html
to understand them better (/etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile, ~/.bashrc, /etc/bashrc and and ~/.bash_logout) this sites may give help:
http://www.faqs.org/docs/abs/HTML/files.html
http://www.faqs.org/docs/securing/chap6sec64.html
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_01.html
http://www.linux-migration.org/ch02s03.html
http://www.gnu.org/software/bash/manual/bash.html
http://www.comptechdoc.org/os/linux/usersguide/linux_ugenvironment.html
http://www.linuxfromscratch.org/blfs/view/6.1/postlfs/profile.html Posted in bash, Scripting & CLI No Comments »
December 15, 2006
If you’re new to Linux programming, then you might be interested in considering these aspects before you start your wonderful journey. Especially if you’ve programmed in Windows, you might want to change some of your ideas, so that you minimize the “culture” shock you experience when you encounter completely different ideas and ways of thinking.
Continue reading at
Hari’s Corner Posted in Scripting & CLI No Comments »
Recent Comments