Wednesday, October 26, 2011

Linux Managing Files; Command



In order to get used to Linux, it is rather important for a beginner to learn how to handle file and directory in the Linux system. Just like using windows operating system, you need to create new files, create new directory, remove files, remove directories, change file name, copy directory and so on.
Manage files and directories in Linux system is an administration job and also a part of system security. Every file and directory in Linux belongs to a certain owner and group owner. They also have permissions applied.
Below we have listed commands which can be used to manage files and directories in Linux.
  • To delete a file, enter: delete [filename]
    Note: Replace [filename] with the name of the file you want to delete.
     
  • To move a file to a folder, enter: move [filename] [folder name]
    Notes:
    • Replace [filename] with the name of the file you want to move.
    • Replace [folder name] with the name of the folder to which you want to move the file.

  • To rename a file, enter: move [filename] [new file name]
    Notes:
    • Replace [filename] with the name of the file you want to rename.
    • Replace [new file name] with the file's new name.

  • To create a new folder, enter: mkdir [new folder name]
    Note: Replace [new folder name] with the name of the folder you want to create.
     
  • To delete a folder, enter: rmdir [folder name]
    Note: Replace [folder name] with the name of the folder you want to delete.
     
  • To copy a file, enter: cp [filename] [new file name]
    Notes:
    • Replace [filename] with the name of the file you want to copy.
    • Replace [new file name] with a name for the copied file.

  • To change your local working directory, enter: lcd [local directory]
    Note: Replace [local directory] with the path to the local directory you want to use.
     
  • To change your remote working directory, enter: cd [remote directory]
    Note: Replace [remote directory] with the path to the remote directory you want to use.
     
  • To display files in your remote directory, enter: ls
  • To display files in your local directory, enter: lls
  • To print your local working directory, enter: lpwd
  • To print your remote working directory, enter: pwd
  • To exit , enter: quit / exit





2 comments:

hariz s said...

this is neat, thanks for the info

yaya said...

god job :)!