[SOLVED] CS代写 – you should know the following shell concepts

30 $

File Name: CS代写_–_you_should_know_the_following_shell_concepts.zip
File Size: 536.94 KB

SKU: 2843467612 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


– you should know the following shell concepts
– hierarchical file system
– directory tree
– root directory

Copyright By PowCoder代写加微信 assignmentchef

– home directory
– standard directory contents
– /etc: configuration files
– /dev: device files
– /home: user home directories
– /lib: shared library files used by core systems programs
– /sbin: system binaries for vital system tasks
– /usr: programs and support files for users
– /var: system log files
– absolute path: starts with root directory, that is “/”, and specifies a
complete path for a file or a directory, e.g. /usr/bin/firefox
– relative path: specifies the path for a file relative to the current
directory; e.g. if the current directory is /usr, then ./bin/firefox is a
relative path for the firefox binary
– types of shell commands
– binary files: separate programs executed by shell
– shell builtins: commands interpreted by shell, the functionality for these
commands are implemented in the shell program itself
– aliases: shortcuts defined by users to avoid typing of long commands or
command sequences
– shell variables: variables that a user can set to control shell’s behavior
– PATH: when a user types a command, shell looks for the binary in the list
of directories present in the PATH variable.
– input/output redirection
– every program executed in shell has three streams associated with it
– standard input: where the program reads the input from; attached to
keyboard by default
– standard output: where the program writes its output; attached to screen
by default
– standard error: where the program writes its errors; attached to screen
by default
– shell allows us to redirect these streams from their defaults
– use > to redirect standard output to a file:
– ls -l /usr/bin >ls-output.txt
– use >> to append standard output to a file; using >> will append to a
file whereas using > will wipe the output of the file first before
writing to it; thus, after the following commands, the file ls-output.txt
will have twice the contents of the /usr/bin directory:
– ls -l /usr/bin >ls-output.txt
– ls -l /usr/bin >>ls-output.txt
– use 2> to redirect standard error to a file:
– ls -l /nonexistentfile 2>ls-error.txt
– use < to read input from a file instead of keyboard:- cat < /etc/passwd- shell allows us to send the output of one program to the input of anotherprogram using pipe (|). the following command sequence sends the output of”ls -l /usr/bin” command to the input of “less” command for easier- ls -l /usr/bin | less- shell allows us to form powerful pipelines to perform arbitrarily complextasks. see the lecture for an example.- you should know the following shell commands; use tldr command to find out themost frequently used forms of these commands:- the following is an example shell session. you should be able to understandand explain what is going on:demo DocumentsMusic Templates VideosDesktopDownloadsPublictypescriptbindev liblibx32mnt rootsnapsysvarboot etc lib32lost+foundopt run srv tmpcdromhomelib64media procsbinswapfileusr..config.gitconfigPublic typescript.. demo .gnupg.ssh Videos.bash_historyDesktop.local.sudo_as_admin_successful.bash_logout Documents.mozillaTemplates.bashrcDownloadsMusic .thunderbird.cache .emacs.d .profile.tldrdemo DocumentsMusic Templates VideosDesktopDownloadsPublictypescriptdemo: directoryfile demo.cdemo.c: C source, ASCII textcat demo.c#include

int main() {
printf(“welcome to git demo!
”);
printf(“Nice to meet you!”);
alias alert=’notify-send –urgency=low -i “$([ $? = 0 ] && echo terminal || echo error)” “$(history|tail -n1|sed -e ‘”s/^s*[0-9]+s*//;s/[;&|]s*alert$//’”)”‘
alias egrep=’egrep –color=auto’
alias fgrep=’fgrep –color=auto’
alias grep=’grep –color=auto’
alias l=’ls -CF’
alias la=’ls -A’
alias ll=’ls -alF’
alias ls=’ls –color=auto’
alias deepdir=’mkdir a; cd a; mkdir b; cd b; mkdir c; cd c’
alias alert=’notify-send –urgency=low -i “$([ $? = 0 ] && echo terminal || echo error)” “$(history|tail -n1|sed -e ‘”s/^s*[0-9]+s*//;s/[;&|]s*alert$//’”)”‘
alias deepdir=’mkdir a; cd a; mkdir b; cd b; mkdir c; cd c’
alias egrep=’egrep –color=auto’
alias fgrep=’fgrep –color=auto’
alias grep=’grep –color=auto’
alias l=’ls -CF’
alias la=’ls -A’
alias ll=’ls -alF’
alias ls=’ls –color=auto’
mkdir: cannot create directory ‘a’: File exists
mkdir: cannot create directory ‘b’: File exists
mkdir: cannot create directory ‘c’: File exists
rmdir: failed to remove ‘a’: Directory not empty
type deepdir
deepdir is aliased to `mkdir a; cd a; mkdir b; cd b; mkdir c; cd c’
unalias deepdir
type deepdir
bash: type: deepdir: not found
demo DocumentsMusic Templates Videos
DesktopDownloadsPublictypescript
rmdir Videos
mkdir Videos
demo DocumentsMusic Templates Videos
DesktopDownloadsPublictypescript
cp /etc/passwd x
x: ASCII text
cp /etc/passwd Documents/
ls Documents/
cp /etc/passwd Documents/mypasswd
ls -l Documents/
-rw-r–r– 1 neo neo 2744 Feb2 07:50 mypasswd
-rw-r–r– 1 neo neo 2744 Feb2 07:49 passwd
mv Documents Templates/
demoDesktopDownloadsMusicPublicTemplatestypescriptVideosx
ls Templates/
ls Templates/Documents/
mypasswdpasswd

程序代写 CS代考加微信: assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代写 – you should know the following shell concepts
30 $