GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — operating-system/Assignment01.txt at master · SandeshWaykar/operating-system Expand file tree/ Copy pathAssignment01.txtMore file actions 227 lines (163 loc) · 6.62 KB / Copy pathAssignment01.txtFile metadata and controls227 lines (163 loc) · 6.62 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 ASSIGNMENT NO:- 01 ROLL NO:- 200240520086 Q.1) 1.1.date =>day date time will be shown date +%a =>short name of day will be shown only date +%A =>full name of day will be shown only date +%b =>short name of month will be shown only date +%B =>full name of month will be shown only date +%d =>short date will be shown only date +%D =>full date format will be shown with forward slashes only date +%F =>full date format will be shown with hi-fens only date +%T =>time will be shown only -------------------------------------------------------------------------------------------------------------------------- 1.2. cal => show calendar cal jan 2020 -------------------------------------------------------------------------------------------------------------------------- 1.3. bc => It is basic calculator in linux. after typing this command one can do basic calculator operations -------------------------------------------------------------------------------------------------------------------------- 1.4. echo => echo command in linux is used to display line of text/string that are passed as an argument . 1. \b : it removes all the spaces in between the text 2. \c : suppress trailing new line with backspace interpreter 3. \n : this option creates new line from where it is used. 4. \t : this option is used to create horizontal tab spaces. 5. \r : carriage return with backspace interpreter ‘-e‘ to have specified carriage return in output. 6. \v : this option is used to create vertical tab spaces. 7. \a : alert return with backspace interpreter ‘-e‘ to have sound alert. 8. echo * : this command will print all files/folders, similar to ls command . 9. -n : this option is used to omit echoing trailing newline . -------------------------------------------------------------------------------------------------------------------------- 1.5. who => The who command is used to get information about currently logged in user on to system -------------------------------------------------------------------------------------------------------------------------- 1.6. whoami => To display system’s username -------------------------------------------------------------------------------------------------------------------------- 1.7. logname => print user´s login name,Print the name of the current user -------------------------------------------------------------------------------------------------------------------------- 1.8. uname => uname is a command-line utility that prints basic information about the operating system name and system hardware -s, (--kernel-name) - Prints the kernel name. -n, (--nodename) - Prints the system’s node name (hostname). This is the name the system uses when communicating over the network. When used with the -n option, uname produces the same output as the hostname command. -r, (--kernel-release) - Prints the kernel release. -v, (--kernel-version) - Prints the kernel version. -m, (--machine) - Prints the name of the machine’s hardware name. -p, (--processor) - Prints the architecture of the processor. -i, (--hardware-platform) - Prints the hardware platform. -o, (--operating-system) - Print the name of the operating system. On Linux systems that is “GNU/Linux” -a, (--all) - When the -a option is used, uname behaves the same as if the -snrvmo options have been given. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.9. seq => seq command in Linux is used to generate numbers from FIRST to LAST in steps of INCREMENT. It is a very useful command where we had to generate list of numbers in while, for, until loop. 1. seq LAST 2. seq FIRST LAST 3. seq FIRST INCREMENT LAST 4. seq -f “FORMAT” FIRST INCREMENT LAST 5. seq -s “STRING” FIRST INCREMENT LAST 6. seq -w FIRST INCREMENT LAST 1. 10. clear => clear screen. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Q.2) A) mkdir a b c cd a touch a.txt b.txt c.txt cd cd b touch a.txt b.txt c.txt Cd cd c touch a.txt b.txt c.txt cp -r c a B) mv b c c) alias Akshay="ls -lh" d) mv a cdac =============================================================================== Q.3) A) touch file1.txt file2.txt file3.txt file4.txt file5.txt echo 'Akshay'>> file1.txt file2.txt file3.txt file4.txt file5.txt b) cat file1.txt file2.txt file3.txt file4.txt file5.txt c) touch file1.txt file2.txt file3.txt file4.txt file5.txt d) rm -r c cdac a ===================================================================== Q.4) vi testfile i to insert text escape to leave insert :wq to exit a)cat testfile b)cat -n testfile c) tac testfile d) cat file1 file2 file3 ====================================================================== Q.5) a)column filename.txt b) sort filename.txt sort -r filename.txt c) mkdir .aa .bb .c.txt ls -a d) touch -a file1.txt file2.txt ls -t ls -rt e) ls -r f) ls -l g) ls -ld ========================================================================================================== Q.1) mkdir Sandesh touch a.txt b.txt c.txt dtxt chmod u-rwx Sandesh a)chmod u+rw- bar b)chmod +r-- c) chmod +x ========================================================= Q.2) chmod +x Sandesh Q.3) chmod -wx Sandesh Q.4) echo * Sandesh Q.5) echo * /etc/ Q.6) find /etc -type f -name "*.conf" Q.7) echo 'helloo' >> a.txt ======================================================================== Note:Many operation might not work.Analyze them 1) mkdir a cd a touch a.txt touch .hidden.txt a. mkdir b cd b touch b.txt touch .hidden1.txt b. mkdir c touch c.txt touch .hidden2.txt c. cp -r c a d. cp -r a/a.txt a/b cp -r a/c/ a/b =========================================== 2) chmod a=r c 3)permission denied 4)mkdir data 5) chmod +rw b 6)mkdir data2 7)touch data.txt 8)mv c copied_dir 9)chmod +x copied_dir 10)ls 11)permission denied for hidden file,c.txt file 12)mv a/b/data/ a 13)sudo chmod 14)chmod o+rwx a 15)mkdir sample 16)mkdir x 17)mv x a 18)mkdir movies 19)Change group of movies to sudo 20) Change group of movies to avahi 21)chmod a=rwx a 22) Try Changing permission after changing group to sudo without sudo. 23) Try Changing owner and group both to root 24) Try changinging permission 25)rm b.txt ============================================================== |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |