How to Perform file related operations at the shell prompt - Computer Programming

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

Monday, March 2, 2015

How to Perform file related operations at the shell prompt

Perform the following file related operations at the shell prompt.

1.  Create file named linux_distros.txt Add the names of the linux distributions you know.

2.  Display the content of the file linux_distros.txt.

3.  Copy the file linux_distros.txt to a new file list_of_linux_distributions.txt.

4.  Rename the file list_of_linux_distributions.txt to linux.txt.

5.  Delete the file linux.txt.

$ cat > linux_distros.txt debian

fedora ubuntu slackware centos OpenSuSE ^D

$ cat linux_distros.txt debian

fedora ubuntu slackware centos OpenSuSE

$ cp linux_distros.txt list_of_linux_distributions.txt

$ mv list_of_linux_distributions.txt linux.txt


$ rm linux.txt

No comments:

Post a Comment