





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Linux operating system which was developed through a cooperation of numerous people around the world is free and accessible by everyone in the world(open-source). What is good about linux Linux has a rich collection of applications which are free and commercial as well as a lare variety of tools ,graphical ,word processing ,networking ,security and administration Another aspect of l is its appeal to users is the amazing range of peripheral that is supported and the speed is at which the …. Is also important to users Is the amount of software that is available, not just source code but also rebuilt binaries that are easy to install and easy to run. Linux supports programs called ….that run code intended for other systems A virtual machine appears to the user and the software running it as a completely physical machine.
The Slash is followed by the name of the file located in the file directory. An Absolute path name can continue tracing a path through all intermediate intermediatory to the file identified by the path name. Relative path name traces a path a from the working directory to a file. The path is relative to the working directory ,any path name that does not begin with the root directory is a relative path name. 777 711 Owner can read,write and execute files.Groups and others can execute files 644 Owner can read and write file ,Group and others can read file. 640 Owner can read and write file.Group can read file,Others cannot access file. R - w- 2 x – 1 LINUX COMMANDS Mkdir – Create new directory Touch file_name – Creates a file Cd – change to directory Cat – displays the contents of a file Creates and text to the file Ls – lists files Head – Displays the first 10 lines of a file Tail – Displays the last 10 lines of a file Tac- Dsplays the files content in reverse More – Displays Large Content Id – displays the user id of the User Ls – la Grep – filer to search a given paatern in a file e.g grep Linux file1.txt – searches the name Linux in the file1.txt Ping – diplays the network connectivity History – Displays the history of the commands inserted before Hostname –
Example 3 Touch temp Set -o noclobber – used to prevent accidental overwriting of files Echo “Hii There”>temp Example 4 Vi orange This is an orange Vi pear This is a pear Cat orange Cat pear >>orange - adds content of file pear to file orange Cat orange Example 5 Vi whoson Date Echo “Users currently Logged in” W :wq Cat whoson ./whoson Ls -l whoson Drw- Chmod 777 whoson Ls -l whoseon Drw- ./whoseon SCRIPTS Example vi bash_script #!bin/bash Echo”This is a bash script” :wq Cat bash_script ./bash_script Vi perl-script- Pl #!/bin/perl -w Print(this is a perl script) Vi tcsh_script #!/bin/tcsh Echo”this is a tcsh script” Set person =zach
Ps – f – lists all the users … true|| false && false echo $? – 1 false && false || true echo $? – 0 (true||false) && false echo $? – 1 false && (false || true) echo $? – 1 person=max echo person echo $person person=”Max and Zach”
x= local y= echo “demo:&x &y “ echo {4..8} echo {8..16..2} echo {a..m..3} seq 4 8 seq -sl 8 16 2 vi age-check read – p”How old are you” age echo “Wow in $((100-age)),you will be 100 years “ :wq Cat age-check ./age-check It seems you've provided a mix of commands, expressions, and function definitions in your question. Let's categorize and explain them:
ps -f: This command lists all processes in a full-format listing.echo $?: This command prints the exit status of the last executed command. $? holds the exit status of the most recently executed foreground pipeline.locale: This command displays information about the current locale settings.locale -av: This command lists all available locales.pstree -p: This command displays a tree diagram of running processes.history: This command displays a list of previously executed commands.hash -r: This command resets the command hash table.fc -l: This command lists previously executed commands.true || false && false: This expression evaluates to true because the first condition (true) is true. The && operator will only evaluate the second expression if the first one is true, but it doesn't matter because the result is already determined.false && false || true: This expression evaluates to true because the last condition (true) is true. The && operator short-circuits when the first expression is false, so the second expression isn't evaluated.(true || false) && false: This expression evaluates to false because the last condition (false) is false.false && (false || true): This expression evaluates to false because the last condition (false || true) is true, but the first condition (false) is false.person=max: This assigns the string "max" to the variable person.person="Max and Zach": This assigns the string "Max and Zach" to the variable person.say_hii () { echo "hii"; }: Defines a function named say_hii that echoes "hii".