This article describes how to manage your files in Red Hat Enterprise Linux 5 or CentOS 5.
File Management (GUI)
Managing files in GUI mode is a simple as launching the File Browser.

1. Click Applications, select System Tools then click File Browser. This will launch the File Browser window.File Management (Console)
Below are the console commands to manage files. This is just an overview of the commands available, to get more information, type in man command to get the manual for the specified command.
Common Operations
- cp -a source dest
copy the specified file or directory - rm -rf name
delete the specified file or directory and all of its contents - mv old new
move a file or directory to a new location. Also used to rename a file or directory - ln -s source linkname
create a symbolic link to the specified file or directory
Directory Operations
- cd
change to the home directory - cd path
change to the specified directory - pwd
print working directory - ls
list directory - mkdir name
create the specified directory - rmdir name
delete the specified directory. Directory should be empty
File Operations
- chown owner file
change the file owner to the specified user - chmod permissions files
change the file permissions - cat file
shows the file content - more file
shows the file content a few screens at a time - less file
shows the file content similar to how vi displays a file - vi file
edit the specified file. Learn how to use the vi editor - head file
shows the first few lines of a file - tail file
shows the last few lines of a file - sort file
shows the file content in order by lines - uniq file
shows the file content, discarding all but one of successive identifical lines - grep pattern file
searches for the pattern inside the specified file - file filename
determine file type - diff file1 file1
compares two files
Recommended Book

Linux Command Line and Shell Scripting Bible
It is painful to work with Linux if you are not familiar with its arcane commands. Googling the right command for every problem encountered wastes a lot of valuable time.
Learning its commands enables you to do more with less time. Wouldn’t it be great if those backups are performed automatically everyday. Or you are notified via email if your file server is about to run out of disk space.
This book provides a comprehensive list of Linux commands and shows you how to use them in a clear and concise manner.
Visit the forum to ask for help or to give a comment.
***
Posted on 8/29/2010 and last updated on 9/11/2010
Filed under CentOS 5 , Red Hat Enterprise Linux 5 , System Administration
