Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C/C++ in UNiX HELP!! 1. [100 = 25*4] Create a script of the session while experi

ID: 3872882 • Letter: C

Question

C/C++ in UNiX HELP!!

1. [100 = 25*4] Create a script of the session while experimenting with the following

commands in one your directories:

I.

List currently running jobs

II.

Kill one of the running jobs

III.

Cat an existing file using a command that misspells one character in the filename

IV.

Correct the character using the next command run cat on correct file

V.

Try to list files in lost+found directory

VI.

Find utilities to compress files and directories on your system

VII.

Run the ls command with –help option

VIII.

Run the help command on echo

IX.

Echo your name and pipe it to the od command to see each character

X.

Create a new file containing only your name using echo

XI.

Remove the file you just created

XII.

Copy an existing file in your directory to another file

XIII.

Move the copies file to another file

XIV.

Use grep to search for a word in one of your files

XV.

Display the first line of a file

XVI.

Display the last line of a file

XVII.

Sort the contents of a file

XVIII.

Compare two files

XIX.

Find the type of files in your directory

XX.

Compress a directory using tar command

XXI.

Compress the tar file you created using gzip

XXII.

Put this .tar.gz file into another directory and uncompresss to get original

directory back

XXIII.

List the users on your system

XXIV.

Write today’s date and time

XXV.

Exit the script using exit command

Explanation / Answer

Commands to be run on your terminal:

1. To create a script of the session, use the script command followed by file name.

sreekar@sreekar-VirtualBox:~$ script run.txt

This command opens a sub-shell in which you can execute your commands. All commands executed and their output will be logged to script.txt

To exit, type "exit"

I have pasted the commands, I run, from 2 to 25 below. These command were stored in run.txt

sreekar@sreekar-VirtualBox:~$ cat run.txt
Script started on Thursday 07 September 2017 01:16:12 PM IST
sreekar@sreekar-VirtualBox:~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1 0.2 0.2 119740 5976 ?        Ss   13:06   0:01 /sbin/init spla
root         2 0.0 0.0      0     0 ?        S    13:06   0:00 [kthreadd]
root         3 0.0 0.0      0     0 ?        S    13:06   0:00 [kworker/0:0]
root         4 0.0 0.0      0     0 ?        S<   13:06   0:00 [kworker/0:0H]
root         5 0.0 0.0      0     0 ?        S    13:06   0:00 [kworker/u2:0]
root         6 0.0 0.0      0     0 ?        S    13:06   0:00 [ksoftirqd/0]
root         7 0.0 0.0      0     0 ?        S    13:06   0:00 [rcu_sched]
root         8 0.0 0.0      0     0 ?        S    13:06   0:00 [rcu_bh]
root         9 0.0 0.0      0     0 ?        S    13:06   0:00 [migration/0]
root        10 0.0 0.0      0     0 ?        S<   13:06   0:00 [lru-add-drain]
root        11 0.0 0.0      0     0 ?        S    13:06   0:00 [watchdog/0]
root        12 0.0 0.0      0     0 ?        S    13:06   0:00 [cpuhp/0]
root        13 0.0 0.0      0     0 ?        S    13:06   0:00 [kdevtmpfs]
root        14 0.0 0.0      0     0 ?        S<   13:06   0:00 [netns]
root        15 0.0 0.0      0     0 ?        S    13:06   0:00 [khungtaskd]
root        16 0.0 0.0      0     0 ?        S    13:06   0:00 [oom_reaper]
root        17 0.0 0.0      0     0 ?        S<   13:06   0:00 [writeback]
root        18 0.0 0.0      0     0 ?        S    13:06   0:00 [kcompactd0]
root        19 0.0 0.0      0     0 ?        SN   13:06   0:00 [ksmd]
root        20 0.0 0.0      0     0 ?        SN   13:06   0:00 [khugepaged]
root        21 0.0 0.0      0     0 ?        S<   13:06   0:00 [crypto]
root        22 0.0 0.0      0     0 ?        S<   13:06   0:00 [kintegrityd]
root        23 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        24 0.0 0.0      0     0 ?        S<   13:06   0:00 [kblockd]
root        25 0.0 0.0      0     0 ?        S<   13:06   0:00 [ata_sff]
root        26 0.0 0.0      0     0 ?        S<   13:06   0:00 [md]
root        27 0.0 0.0      0     0 ?        S<   13:06   0:00 [devfreq_wq]
root        28 0.0 0.0      0     0 ?        S<   13:06   0:00 [watchdogd]
root        29 0.0 0.0      0     0 ?        S    13:06   0:00 [kworker/u2:1]
root        30 0.0 0.0      0     0 ?        S    13:06   0:00 [kworker/0:1]
root        32 0.0 0.0      0     0 ?        S    13:06   0:00 [kauditd]
root        33 0.0 0.0      0     0 ?        S    13:06   0:00 [kswapd0]
root        34 0.0 0.0      0     0 ?        S<   13:06   0:00 [vmstat]
root        35 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        36 0.0 0.0      0     0 ?        S    13:06   0:00 [ecryptfs-kthre
root        76 0.0 0.0      0     0 ?        S<   13:06   0:00 [kthrotld]
root        77 0.0 0.0      0     0 ?        S<   13:06   0:00 [acpi_thermal_p
root        78 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        79 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        80 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        81 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        82 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        83 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        84 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        85 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root        86 0.0 0.0      0     0 ?        S    13:06   0:00 [scsi_eh_0]
root        87 0.0 0.0      0     0 ?        S<   13:06   0:00 [scsi_tmf_0]
root        88 0.0 0.0      0     0 ?        S    13:06   0:00 [scsi_eh_1]
root        89 0.0 0.0      0     0 ?        S<   13:06   0:00 [scsi_tmf_1]
root        95 0.0 0.0      0     0 ?        S<   13:06   0:00 [ipv6_addrconf]
root       116 0.0 0.0      0     0 ?        S<   13:06   0:00 [charger_manage
root       117 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root       167 0.0 0.0      0     0 ?        S<   13:06   0:00 [kworker/0:1H]
root       168 0.0 0.0      0     0 ?        S    13:06   0:00 [scsi_eh_2]
root       169 0.0 0.0      0     0 ?        S<   13:06   0:00 [scsi_tmf_2]
root       170 0.0 0.0      0     0 ?        S<   13:06   0:00 [bioset]
root       193 0.0 0.0      0     0 ?        S    13:06   0:00 [jbd2/sda1-8]
root       194 0.0 0.0      0     0 ?        S<   13:06   0:00 [ext4-rsv-conve
root       220 0.0 0.1 29756 3572 ?        Ss   13:06   0:00 /lib/systemd/sy
root       246 0.0 0.2 45576 4608 ?        Ss   13:06   0:00 /lib/systemd/sy
root       312 0.0 0.0      0     0 ?        S<   13:06   0:00 [iprt-VBoxWQueu
root       314 0.0 0.0      0     0 ?        S<   13:06   0:00 [ttm_swap]
root       608 0.0 0.4 298452 8404 ?        Ssl 13:06   0:00 /usr/lib/accoun
avahi      609 0.0 0.1 44788 3160 ?        Ss   13:06   0:00 avahi-daemon: r
root       612 0.0 0.4 337380 8760 ?        Ssl 13:06   0:00 /usr/sbin/Modem
syslog     617 0.0 0.1 256396 3388 ?        Ssl 13:06   0:00 /usr/sbin/rsysl
message+   634 0.0 0.2 44264 5180 ?        Ss   13:06   0:00 /usr/bin/dbus-d
avahi      684 0.0 0.0 44788   340 ?        S    13:06   0:00 avahi-daemon: c
root       705 0.0 0.9 462816 18820 ?        Ssl 13:06   0:00 /usr/sbin/Netwo
root       706 0.0 0.0   4400 1312 ?        Ss   13:06   0:00 /usr/sbin/acpid
root       707 0.0 0.1 36076 2964 ?        Ss   13:06   0:00 /usr/sbin/cron
root       708 0.0 0.4 274816 9064 ?        Ssl 13:06   0:00 /usr/sbin/cups-
root       709 0.0 0.1 28628 3232 ?        Ss   13:06   0:00 /lib/systemd/sy
root       710 0.0 1.1 201612 22908 ?        Ssl 13:06   0:00 /usr/lib/snapd/
root       767 0.0 0.5 304340 10636 ?        Ssl 13:06   0:00 /usr/lib/policy
root       788 0.0 0.4 292200 8228 ?        SLsl 13:06   0:00 /usr/sbin/light
root       820 1.2 4.0 421596 82480 tty7     Ssl+ 13:06   0:07 /usr/lib/xorg/X
root       826 0.0 0.1 255368 2552 ?        Sl   13:06   0:00 /usr/sbin/VBoxS
root       852 0.0 0.1 16120 3788 ?        S    13:06   0:00 /sbin/dhclient
nobody     864 0.0 0.2 59936 4232 ?        S    13:06   0:00 /usr/sbin/dnsma
root      1072 0.0 0.3 230304 6488 ?        Sl   13:06   0:00 lightdm --sessi
whoopsie 1138 0.0 0.6 386608 12668 ?        Ssl 13:06   0:00 /usr/bin/whoops
root      1144 0.0 0.0 23008 1788 tty1     Ss+ 13:06   0:00 /sbin/agetty --
root      1151 0.0 0.4 354212 9572 ?        Ssl 13:06   0:00 /usr/lib/upower
colord    1170 0.0 0.6 320640 12672 ?        Ssl 13:06   0:00 /usr/lib/colord
rtkit     1171 0.0 0.1 183544 3148 ?        SNsl 13:06   0:00 /usr/lib/rtkit/
sreekar   1202 0.0 0.2 45248 4652 ?        Ss   13:07   0:00 /lib/systemd/sy
sreekar   1203 0.0 0.0 63356 1980 ?        S    13:07   0:00 (sd-pam)
sreekar   1209 0.0 0.3 212284 6464 ?        Sl   13:07   0:00 /usr/bin/gnome-
sreekar   1211 0.0 0.2 53552 4780 ?        Ss   13:07   0:00 /sbin/upstart -
sreekar   1294 0.0 0.0 39928   288 ?        S    13:07   0:00 upstart-udev-br
sreekar   1298 0.0 0.1 43748 4064 ?        Ss   13:07   0:00 dbus-daemon --f
sreekar   1310 0.0 0.4 93416 8776 ?        Ss   13:07   0:00 /usr/lib/x86_64
sreekar   1334 0.0 0.0 39864   300 ?        S    13:07   0:00 upstart-dbus-br
sreekar   1336 0.0 0.0 39864   304 ?        S    13:07   0:00 upstart-dbus-br
sreekar   1339 0.0 0.0 48356   380 ?        S    13:07   0:00 upstart-file-br
sreekar   1353 0.1 0.4 365432 8628 ?        Ssl 13:07   0:00 /usr/bin/ibus-d
sreekar   1364 0.0 0.3 281592 6176 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1369 0.0 0.3 419960 7312 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1372 0.0 0.3 284608 8100 ?        Sl   13:07   0:00 /usr/lib/ibus/i
sreekar   1385 0.0 1.3 532308 26940 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1388 0.0 1.4 486680 30132 ?        Sl   13:07   0:00 /usr/lib/ibus/i
sreekar   1392 0.0 1.1 437076 24292 ?        Sl   13:07   0:00 /usr/lib/ibus/i
sreekar   1398 0.0 0.0 173608   724 ?        Ss   13:07   0:00 gpg-agent --hom
sreekar   1400 0.0 0.3 353732 7976 ?        Sl   13:07   0:00 /usr/lib/at-spi
sreekar   1411 0.0 0.1 42900 3980 ?        S    13:07   0:00 /usr/bin/dbus-d
sreekar   1414 0.0 0.2 206976 5348 ?        Sl   13:07   0:00 /usr/lib/at-spi
sreekar   1417 0.0 0.3 208744 7804 ?        Sl   13:07   0:00 /usr/lib/ibus/i
sreekar   1429 0.1 1.9 656084 40036 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1431 0.0 1.5 936988 32328 ?        Ssl 13:07   0:00 /usr/lib/unity-
sreekar   1446 0.0 0.7 560560 15360 ?        Ssl 13:07   0:00 /usr/lib/gnome-
sreekar   1450 0.0 1.9 578900 40296 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1470 0.0 0.4 377144 9300 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1474 0.0 0.3 356116 7692 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1478 0.0 0.5 366576 11984 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1480 0.0 0.2 178664 4832 ?        Sl   13:07   0:00 /usr/lib/dconf/
sreekar   1481 0.0 0.9 787960 19200 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1482 0.0 1.2 666456 25272 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1484 0.0 0.7 682852 14344 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1488 0.0 1.2 630244 24556 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1494 0.0 0.6 643324 12504 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1521 0.0 0.6 403148 12944 ?        Ssl 13:07   0:00 /usr/lib/x86_64
sreekar   1542 0.0 0.5 442012 11472 ?        S<l 13:07   0:00 /usr/bin/pulsea
sreekar   1549 0.0 1.1 711500 23652 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1555 4.5 8.4 1245168 173676 ?      Ssl 13:07   0:24 compiz
sreekar   1589 0.0 1.0 438532 20480 ?        Sl   13:07   0:00 /usr/lib/policy
sreekar   1597 0.0 2.9 876860 60752 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1604 0.0 1.5 606656 32516 ?        Sl   13:07   0:00 nm-applet
sreekar   1609 0.1 3.8 750864 79648 ?        Sl   13:07   0:00 /usr/bin/gnome-
sreekar   1616 0.0 1.0 583864 20980 ?        Sl   13:07   0:00 /usr/lib/unity-
sreekar   1617 0.1 2.1 828096 43828 ?        Sl   13:07   0:00 nautilus -n
root      1627 0.1 1.6 635228 33152 ?        Sl   13:07   0:00 /usr/lib/x86_64
sreekar   1632 0.0 0.4 303316 9680 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
root      1636 0.0 0.4 382192 9476 ?        Ssl 13:07   0:00 /usr/lib/udisks
sreekar   1649 0.0 0.2 278788 4952 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1654 0.0 0.2 266592 4560 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1662 0.0 0.2 264600 4928 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1665 0.0 2.4 829880 51124 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1670 0.0 0.4 410680 8744 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1684 0.0 2.4 814128 50464 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1697 0.0 0.9 704356 19544 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1706 0.0 0.9 788036 18820 ?        Sl   13:07   0:00 /usr/lib/evolut
sreekar   1721 0.0 0.4 370716 8584 ?        Sl   13:07   0:00 /usr/lib/gvfs/g
sreekar   1787 0.0 0.7 424212 16364 ?        Sl   13:07   0:00 zeitgeist-datah
sreekar   1794 0.0 0.0   4508   796 ?        S    13:07   0:00 /bin/sh -c /usr
sreekar   1798 0.0 0.4 423432 8860 ?        Sl   13:07   0:00 /usr/bin/zeitge
sreekar   1806 0.0 0.7 321432 15388 ?        Sl   13:07   0:00 /usr/lib/x86_64
sreekar   1868 0.0 1.2 607004 25788 ?        Sl   13:08   0:00 update-notifier
sreekar   1901 0.0 0.4 530292 8692 ?        Sl   13:09   0:00 /usr/lib/x86_64
root      1973 0.0 0.0      0     0 ?        S    13:12   0:00 [kworker/u2:2]
sreekar   1995 1.1 1.7 668336 35212 ?        Sl   13:15   0:00 /usr/lib/gnome-
sreekar   2001 0.1 0.2 29484 5116 pts/4    Ss   13:15   0:00 bash
sreekar   2013 1.3 1.8 589864 36964 pts/4    Sl   13:16   0:00 gedit
sreekar   2018 0.0 0.1 29108 2432 pts/4    S+   13:16   0:00 script run.txt
sreekar   2019 0.3 0.2 29428 5068 pts/17   Ss   13:16   0:00 bash -i
sreekar   2029 0.0 0.1 44432 3372 pts/17   R+   13:16   0:00 ps aux
sreekar@sreekar-VirtualBox:~$ kill 2013
sreekar@sreekar-VirtualBox:~$ cat 1.txx
cat: 1.txx: No such file or directory
sreekar@sreekar-VirtualBox:~$ cat 1.txt
Hi
This is a test file
Hello, World!
sreekar@sreekar-VirtualBox:~$ ls /lost+found/
ls: cannot open directory '/lost+found/': Permission denied
sreekar@sreekar-VirtualBox:~$ find /bin/ -type f -iname tar
/bin/tar
sreekar@sreekar-VirtualBox:~$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.
-a, --all                  do not ignore entries starting with .
-A, --almost-all           do not list implied . and ..
      --author               with -l, print the author of each file
-b, --escape               print C-style escapes for nongraphic characters
      --block-size=SIZE      scale sizes by SIZE before printing them; e.g.,
                               '--block-size=M' prints sizes in units of
                               1,048,576 bytes; see SIZE format below
-B, --ignore-backups       do not list implied entries ending with ~
-c                         with -lt: sort by, and show, ctime (time of last
                               modification of file status information);
                               with -l: show ctime and sort by name;
                               otherwise: sort by ctime, newest first
-C                         list entries by columns
      --color[=WHEN]         colorize the output; WHEN can be 'always' (default
                               if omitted), 'auto', or 'never'; more info below
-d, --directory            list directories themselves, not their contents
-D, --dired                generate output designed for Emacs' dired mode
-f                         do not sort, enable -aU, disable -ls --color
-F, --classify             append indicator (one of */=>@|) to entries
      --file-type            likewise, except do not append '*'
      --format=WORD          across -x, commas -m, horizontal -x, long -l,
                               single-column -1, verbose -l, vertical -C
      --full-time            like -l --time-style=full-iso
-g                         like -l, but do not list owner
      --group-directories-first
                             group directories before files;
                               can be augmented with a --sort option, but any
                               use of --sort=none (-U) disables grouping
-G, --no-group             in a long listing, don't print group names
-h, --human-readable       with -l and/or -s, print human readable sizes
                               (e.g., 1K 234M 2G)
      --si                   likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
                             follow symbolic links listed on the command line
      --dereference-command-line-symlink-to-dir
                             follow each command line symbolic link
                               that points to a directory
      --hide=PATTERN         do not list implied entries matching shell PATTERN
                               (overridden by -a or -A)
      --indicator-style=WORD append indicator with style WORD to entry names:
                               none (default), slash (-p),
                               file-type (--file-type), classify (-F)
-i, --inode                print the index number of each file
-I, --ignore=PATTERN       do not list implied entries matching shell PATTERN
-k, --kibibytes            default to 1024-byte blocks for disk usage
-l                         use a long listing format
-L, --dereference          when showing file information for a symbolic
                               link, show information for the file the link
                               references rather than for the link itself
-m                         fill width with a comma separated list of entries
-n, --numeric-uid-gid      like -l, but list numeric user and group IDs
-N, --literal              print raw entry names (don't treat e.g. control
                               characters specially)
-o                         like -l, but do not list group information
-p, --indicator-style=slash
                             append / indicator to directories
-q, --hide-control-chars   print ? instead of nongraphic characters
      --show-control-chars   show nongraphic characters as-is (the default,
                               unless program is 'ls' and output is a terminal)
-Q, --quote-name           enclose entry names in double quotes
      --quoting-style=WORD   use quoting style WORD for entry names:
                               literal, locale, shell, shell-always,
                               shell-escape, shell-escape-always, c, escape
-r, --reverse              reverse order while sorting
-R, --recursive            list subdirectories recursively
-s, --size                 print the allocated size of each file, in blocks
-S                         sort by file size, largest first
      --sort=WORD            sort by WORD instead of name: none (-U), size (-S),
                               time (-t), version (-v), extension (-X)
      --time=WORD            with -l, show time as WORD instead of default
                               modification time: atime or access or use (-u);
                               ctime or status (-c); also use specified time
                               as sort key if --sort=time (newest first)
      --time-style=STYLE     with -l, show times using style STYLE:
                               full-iso, long-iso, iso, locale, or +FORMAT;
                               FORMAT is interpreted like in 'date'; if FORMAT
                               is FORMAT1<newline>FORMAT2, then FORMAT1 applies
                               to non-recent files and FORMAT2 to recent files;
                               if STYLE is prefixed with 'posix-', STYLE
                               takes effect only outside the POSIX locale
-t                         sort by modification time, newest first
-T, --tabsize=COLS         assume tab stops at each COLS instead of 8
-u                         with -lt: sort by, and show, access time;
                               with -l: show access time and sort by name;
                               otherwise: sort by access time, newest first
-U                         do not sort; list entries in directory order
-v                         natural sort of (version) numbers within text
-w, --width=COLS           set output width to COLS. 0 means no limit
-x                         list entries by lines instead of by columns
-X                         sort alphabetically by entry extension
-Z, --context              print any security context of each file
-1                         list one file per line. Avoid ' ' with -q or -b
      --help     display this help and exit
      --version output version information and exit

The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).

Using color to distinguish file types is disabled both by default and
with --color=never. With --color=auto, ls emits color codes only when
standard output is connected to a terminal. The LS_COLORS environment
variable can change the settings. Use the dircolors command to set it.

Exit status:
0 if OK,
1 if minor problems (e.g., cannot access subdirectory),
2 if serious trouble (e.g., cannot access command-line argument).

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'
sreekar@sreekar-VirtualBox:~$ help echo
echo: echo [-neE] [arg ...]
    Write arguments to the standard output.
  
    Display the ARGs, separated by a single space character and followed by a
    newline, on the standard output.
  
    Options:
      -n   do not append a newline
      -e   enable interpretation of the following backslash escapes
      -E   explicitly suppress interpretation of backslash escapes
  
    `echo' interprets the following backslash-escaped characters:
         alert (bell)
         backspace
      c   suppress further output
      e   escape character
      E   escape character
         form feed
         new line
         carriage return
         horizontal tab
         vertical tab
      \   backslash
      nnn   the character whose ASCII code is NNN (octal). NNN can be
       0 to 3 octal digits
      xHH   the eight-bit character whose value is HH (hexadecimal). HH
       can be one or two hex digits
  
    Exit Status:
    Returns success unless a write error occurs.
sreekar@sreekar-VirtualBox:~$ echo "my name" | od
0000000 074555 067040 066541 005145
0000010
sreekar@sreekar-VirtualBox:~$ echo "my name" > new.txt
sreekar@sreekar-VirtualBox:~$ rm new.txt
sreekar@sreekar-VirtualBox:~$ cp 1.txt 2.txt
sreekar@sreekar-VirtualBox:~$ mv 2.txt 3.txt
sreekar@sreekar-VirtualBox:~$ grep "Hello" 1.txt
Hello, World!
sreekar@sreekar-VirtualBox:~$ head -1 1.txt
Hi
sreekar@sreekar-VirtualBox:~$ tail -1 1.txt
Hello, World!
sreekar@sreekar-VirtualBox:~$ sort 3.txt
Hello, World!
Hi
This is a test file
sreekar@sreekar-VirtualBox:~$ diff 1.txt 3.txt
sreekar@sreekar-VirtualBox:~$ file *.txt
1.txt:   ASCII text
3.txt:   ASCII text
run.txt: ASCII text, with CRLF, LF line terminators, with escape sequences, with overstriking
sreekar@sreekar-VirtualBox:~$ tar -cf test.tar Desktop/
sreekar@sreekar-VirtualBox:~$ gzip test.
test.tar
sreekar@sreekar-VirtualBox:~$ gzip test.tar
sreekar@sreekar-VirtualBox:~$ cp test.tar.gz Documents/
sreekar@sreekar-VirtualBox:~$ tar -xf Documents/test.tar.gz -C Documents/
sreekar@sreekar-VirtualBox:~$ cut -d: -f1 /etc/passwd
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
systemd-timesync
systemd-network
systemd-resolve
systemd-bus-proxy
syslog
_apt
messagebus
uuidd
lightdm
whoopsie
avahi-autoipd
avahi
dnsmasq
colord
speech-dispatcher
hplip
kernoops
pulse
rtkit
saned
usbmux
sreekar
postfix
sreekar@sreekar-VirtualBox:~$ date
Thu Sep 7 13:50:51 IST 2017
sreekar@sreekar-VirtualBox:~$ exit
exit

Script done on Thursday 07 September 2017 01:51:04 PM IST

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote