लिनक्स संबंधी सभी डाउन लॉड्स के लिए निम्न लिंक क्लिक करें:
Although Red Hat Linux has many built in GUI tools, yet it is better to control it from command line interface (CLI) as these tools have more options. Also these commands are faster as they do not include overhead of GNOME or KDE desktops. Therefore, we all must learn and try to command the command line interface.
There are number of different commands in Bourne Again SHell (bash). These can help us either create or delete files or directories, read or search through the files or navigating through directories and perform many other functions.
Note:
1. With reference to directory, domain name, or a computer, we will be using forward slash ( / ) and not the back slash ( \ ).
2. Linux is case sensitive.
3. Switches are used to modify the working of commands. To use a switch, with any command in Linux, we will have to use hyphen ( - ) before it.
4. Inode is the identifier for any file. Every file has its own inode number. The inode includes file size, file permission, disk block where file is located and last access time etc.
All of these informations, combined are called metadata. If inode is corrupt, Linux will not be able to find the respective file. Identical files, i.e. copied files will have same inode provided they are on the same partition.
Exploring commands
ls
This command allows us to see the files and directories in the current directory. With proper switches we also can find the permissions on the file, size of any file, sort the result, check ownership, or even check file type. Few examples of this command are being given here:
Command Details
ls : List all files and directories in current directory
ls -a : List all files and directories in current directory with hidden files also
ls -l : Long listing, i.e. show the permissions, size, owner, date and time etc
ls -i : List files with inode numbers, which represents the location of file in volume
ls -t : List files according to the time of last change
ls -r : List in reverse alphabetical order
ls -F : List files by their types, i.e. the character at the end of file. For example, a ( / ) forward slash indicates directory, @ indicates a linked file or ( * ) asterisk indicates executable file.
No comments:
Post a Comment