Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
Useful Linux tips

 
Post new topic   Reply to topic    dna88 Forum Index -> Linux and open source Discussion Forum
Author Message
aronnok
Beginner User
Beginner User


Joined: 16 Sep 2004
Posts: 44
Location: Dhaka, Bangladesh

Post Post subject: Useful Linux tips Reply with quote

Useful linux tips.

//Don't delete entire posts like that. If I felt it was that necessary to delete that, I/a moderator would do that. Let's be like matured men guys.

Last edited by aronnok on Mon Oct 25, 04 10:19 pm; edited 1 time in total
Sun Oct 10, 04 9:54 pm
Back to top
aronnok View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
dinangkur
Super Moderator
Super Moderator


Joined: 24 Mar 2004
Posts: 491
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

Decompress tar or tar.gz file

tar -xf [archive].tar
tar -zxf [archive].tar.gz

Find specific program which is installed

rpm -qa | grep -i [fileName]

Decompress .bz2 file

bzip2 -d [fileName].bz2

Checking disk uses

du

See listing or info of a long directory

ls /dev | more [you can use "less" too, use it to know how it's work

-DK
_________________
...we too are stardust...
Sun Oct 10, 04 10:10 pm
Back to top
dinangkur View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
aronnok
Beginner User
Beginner User


Joined: 16 Sep 2004
Posts: 44
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

ln - make a link to a file

Format
ln [option] existing-file new-link

Summary
Creates a hard link to the file specified by existing-file with the name given by the new-link argument. A hard link to a file is indistinguishable from the original. A hard link has to be on the same filesystem as the original file. A symbolic link may be across filesystems and existing file and new-link may be directories as well as files.

Options
-s creates a symbolic link instead


locate - locates files

Format
locate pattern

Summary
Lists all files in filedatabase that match the given pattern.
This utility depends on a database file with al list of all files on your filesystem. Use the updatedb utility to update your database (caution, this takes a while)

Example
#locate hepp
This search would find all files on you system that contain hepp. It would find heppgr, tghepp and tyheppl.


echo - just that... an echo :)

Format
echo [option] message

Summary
Very useful in scripting, lets you write messages to the terminal and can be used to display shell variables

Options
-n newline, prevents echo from displaying the newline at the end of the message

Example
#echo 'Hi!'
Hi!
#echo -n 'Hi!'
Hi!#
#echo $TERM <-- this is a shell variable
vt100
#


grep - search for pattern in file

Format
grep [options] pattern [file-list]

Summary
This utility searches one or more files for a pattern. The grep utility performs actions, specified by options every time
it finds a line that contains a match for the pattern.
If you use tabs or spaces in the pattern you must quote it.

Options
if you don't specify any options grep displays the line that contained a match for pattern.
-c count, causes grep to display the number of times it found a match for pattern
-i ignore case, ignores case when finding a match for pattern
-l file list, causes grep to display only the filename in which it found a match for pattern
-v reverse test, causes lines not containing a match to satisfy the search


finger - Get information about other users

Format
finger [options] [user-list]

Summary
With no arguments finger gives you a list of all users logged on to the system together with their full names, terminal device numbers the number of times they logged in and other information. If specify a user on the command line, finger gives you detailed information on that user and displays his/her .plan, .project and .forward file. The really cool thing with finger is that you can finger users on other hosts.

User list options
[user] gives you information on that user on your local system
[user]@[host] gives you information on that particular user on that particular host
@[host] lists all the users currently logged on on that host

Options
-l long, gives you detailed information on about every user currently logged on


kill - terminate a process

Format
kill [option] PID-list

Summary
Terminates all jobs with PID number=PID-list
You can determine what signal to send to terminate the process. These are the possibilities

Options
-0 sh(1) only, signals all members of process group
-9 non-catchable, non-ignorable kill (this is the one to use if you process if doesn't want to get killed)
-15 software termination signal (default)
-HUP A very useful option. This causes kill to terminate the process and to restart it afterwards.

Sun Oct 10, 04 11:24 pm
Back to top
aronnok View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
lifegauge
Just In
Just In


Joined: 15 Nov 2004
Posts: 2

Post Post subject: Reply with quote

Thanks for the great tips.
_________________
FileDeposit™ - Safe, Secure, Simple.
Mon Nov 15, 04 7:23 am
Back to top
lifegauge View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Linux and open source Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group