ReCom.org
All thing Linux Anything related to the penguin.

A piece of Linux command a day...

Reply
 
Thread Tools
oreoboy
Super Junior Member
 
Join Date: Oct 2003
Posts: 19
  #1 Old 12-10-2003 Default A piece of Linux command a day...

hhehehe... just to make this linux forum more happening.. provide us a piece of command each time you read this topic...

Let me start first.. Alamak.. I am a dummy in linux.. i just know...

ls - to list all file and directory in current directory... betul ke?
oreoboy is offline   Reply With Quote
bachok83 Male
Sleepin' G33k
Administrator
 
bachok83's Avatar
 
Join Date: Apr 2003
Posts: 221
  #2 Old 12-10-2003 Default

hahahaha nice...

locate filename - is used when you want to find file named filename

cp filename /path/ - is used to copy file to folder /path/


remember, there is no dir command in linux... (i got infected by a virus once, the ls command cannot be used, but dir simply replace the task.. what a tragedy )
__________________
~~
Looking for cars : http://www.wemotor.com

bachok83 is offline   Reply With Quote
littlebigone Male
Slightly Senior Member
 
Join Date: Apr 2003
Posts: 867
  #3 Old 12-10-2003 Default

mv path1/filename path2/filename can be used to rename or move files where path1 is your source and path2 is your destination
littlebigone is offline   Reply With Quote
bachok83 Male
Sleepin' G33k
Administrator
 
bachok83's Avatar
 
Join Date: Apr 2003
Posts: 221
  #4 Old 12-10-2003 Default

what was rename command againt?? i forgot LOL
__________________
~~
Looking for cars : http://www.wemotor.com

bachok83 is offline   Reply With Quote
masterof_none
Administrator
Administrator
 
Join Date: Apr 2003
Posts: 834
  #5 Old 12-10-2003 Default

rename command is

mv old_filename new_filename

the same command for moving files across directories.
masterof_none is offline   Reply With Quote
oreoboy
Super Junior Member
 
Join Date: Oct 2003
Posts: 19
  #6 Old 12-10-2003 Default

can i ask....?

what is chmod for?
oreoboy is offline   Reply With Quote
masterof_none
Administrator
Administrator
 
Join Date: Apr 2003
Posts: 834
  #7 Old 12-10-2003 Default

chmod is used to change the file permission

in unix, every file has permission. To look at the file permission at a particular directory, use :

ls -l

you will see sth like this :

rwx--x-wx stuff.c

r = read,
w = write
x = execute.

chmod can change those permissions .

also, you can type man chmod for details.
masterof_none is offline   Reply With Quote
masterof_none
Administrator
Administrator
 
Join Date: Apr 2003
Posts: 834
  #8 Old 13-10-2003 Default

you can use one of these 2 ways:
1. use the digit that represent the permission,

e.g
chmod 777 stuff.c
would let every user read, write and execute.
Those digits, 7, represent different permissions.

2. use the alphabet.
e.g chmod a+rwx stuff.c
a =all (user),
masterof_none is offline   Reply With Quote
irfanz
Super Junior Member
 
Join Date: Apr 2003
Posts: 5
  #9 Old 13-10-2003 Default

ps aux

lists all processes and their PID, owner, percentage of memory used, percentage of CPU used... handy when you have processes that eat up resources to kill

just type

kill PID
irfanz is offline   Reply With Quote
littlebigone Male
Slightly Senior Member
 
Join Date: Apr 2003
Posts: 867
  #10 Old 13-10-2003 Default

ooohh...thanks...tahts a good one.
littlebigone is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +8. The time now is 07:48 PM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

ReCom stands for Reborn Community. It has no affiliation with other organizations that may share the same name. The views expressed in this website solely represent the authors point of view and do not necessarily reflect the views of ReCom Anchors and other ReCom users.


 

Page generated in 0.14212 seconds with 13 queries