Beruflich Dokumente
Kultur Dokumente
com
Manoj kumar pradhan
Ph- 7411834957
>ls
add.sh
logfile.txt
prime.pl
If you simply execute ls on the command prompt, then it will display the files and directories in the
current directory.
>ls /usr/local/bin
You can pass a directory as an argument to ls command. In this case, the ls command prints all the
files and directories in the specific directory you have passed.
2. Displaying the contents of a file.
The next thing is to display the contents of a file. The cat command is used to display the contents in
a file.
Ph- 7411834957
>cat file.txt
This is a sample unix file
Learning about unix server is awesome
>head -5 logfile.dat
>tail -3 logfile.dat
>cd /var/tmp
Ph- 7411834957
touch new_file.txt
8. Creating a directory.
Directories are a way of organizing your files. The mkdir command is used to create the specified
directory.
>mkdir backup
Ph- 7411834957
>wc logfile.txt
21
26 198 logfile.txt
To know about the unix command, it is always good to see the man pages. To see the man pages
simply pass the command as an argument to the man.
man ls