0% found this document useful (0 votes)
21 views3 pages

Linux File Management Commands Guide

The document contains a series of terminal commands executed on a Linux system, showcasing file and directory management. It includes commands for listing files, creating files, moving files, and displaying file contents. The user interacts with various files and directories, demonstrating basic command-line operations and file manipulations.

Uploaded by

jeswinjohn20021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Linux File Management Commands Guide

The document contains a series of terminal commands executed on a Linux system, showcasing file and directory management. It includes commands for listing files, creating files, moving files, and displaying file contents. The user interacts with various files and directories, demonstrating basic command-line operations and file manipulations.

Uploaded by

jeswinjohn20021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd

VML23CS126

student@cc041-OptiPlex-3020:~$ ls
a.out Desktop Downloads juvanita Music Pictures quick.c snap Videos
constpro.c Documents expression.txt merge.c output14.txt Public sam.c Templates
student@cc041-OptiPlex-3020:~$ ls -R
a.out Desktop Downloads juvanita Music Pictures quick.c snap Videos
constpro.c Documents expression.txt merge.c output14.txt Public sam.c Templates
./Desktop:
A.class B.class fNf NIVED.odt PatternMain.class Printinghi.class quick.odt
a.out bubbleSort.c merge.c.odt Pattern.class PatternMain.java Printinghi.java 'Untitled 1.odt'
./Desktop/fNf:
round1 round2 round3
./Desktop/fNf/round1:
round1.c
./Desktop/fNf/round2:
a.out semifinal.c
./Desktop/fNf/round3:
a.out final.c
./Documents:
QS.pdf
./Downloads:
./juvanita:

Calculator.java DoublyLinkedList.class DoublyLinkedList.java Node.class quick.java QuickSort.class

QuickSort.java

./Music:

./Pictures:
Screenshots

./Pictures/Screenshots:
'Screenshot from 2024-10-05 12-10-23.png'

./Public:

./snap:
firefox snapd-desktop-integration

./snap/firefox:
4848 5187 common current

./snap/firefox/4848:

./snap/firefox/5187:

./snap/firefox/common:

./snap/snapd-desktop-integration:
178 253 common current

./snap/snapd-desktop-integration/178:

./snap/snapd-desktop-integration/253:

./snap/snapd-desktop-integration/common:

./Templates:
./Videos:
student@cc041-OptiPlex-3020:~$ ls -S
a.out Documents juvanita Pictures snap Videos quick.c sam.c output14.txt
Desktop Downloads Music Public Templates constpro.c merge.c expression.txt
student@cc041-OptiPlex-3020:~$ ls -l
total 76
-rwxrwxr-x 1 student student 16272 Oct 24 12:04 a.out
-rw-rw-r-- 1 student student 1378 Oct 5 16:36 constpro.c
drwxr-xr-x 3 student student 4096 Nov 7 17:20 Desktop
drwxr-xr-x 2 student student 4096 Nov 3 15:28 Documents
drwxr-xr-x 2 student student 4096 Oct 24 12:08 Downloads
-rw-rw-r-- 1 student student 23 Oct 5 15:26 expression.txt
drwxrwxr-x 2 student student 4096 Nov 4 11:04 juvanita
-rw-rw-r-- 1 student student 964 Oct 24 11:59 merge.c
drwxr-xr-x 2 student student 4096 Oct 5 15:01 Music
-rw-rw-r-- 1 student student 0 Oct 14 11:00 output14.txt
drwxr-xr-x 3 student student 4096 Oct 5 16:40 Pictures
drwxr-xr-x 2 student student 4096 Oct 5 15:01 Public
-rw-rw-r-- 1 student student 1165 Oct 24 11:51 quick.c
-rw-rw-r-- 1 student student 923 Oct 14 11:00 sam.c
drwx------ 4 student student 4096 Oct 5 15:01 snap
drwxr-xr-x 2 student student 4096 Oct 5 15:01 Templates
drwxr-xr-x 2 student student 4096 Oct 5 15:01 Videos
student@cc041-OptiPlex-3020:~$ ls -1
a.out
constpro.c
Desktop
Documents
Downloads
expression.txt
juvanita
merge.c
Music
output14.txt
Pictures
Public
quick.c
sam.c
snap
Templates
Videos
student@cc041-OptiPlex-3020:~$ ls -t
Desktop Documents a.out quick.c sam.c constpro.c snap Public Videos
juvanita Downloads merge.c output14.txt Pictures expression.txt Music Templates
student@cc041-OptiPlex-3020:~$ ls -s
total 76
16 a.out 4 Desktop 4 Downloads 4 juvanita 4 Music 4 Pictures 4 quick.c 4 snap 4 Videos
4 constpro.c 4 Documents 4 expression.txt 4 merge.c 0 output14.txt 4 Public 4 sam.c 4 Templates
student@cc041-OptiPlex-3020:~$ touch file.txt
student@cc041-OptiPlex-3020:~$ touch file2.txt

student@cc041-OptiPlex-3020:~$ cat file.txt


hello
student@cc041-OptiPlex-3020:~$ cat file2.txt
world
student@cc041-OptiPlex-3020:~$ cat file.txt file2.txt
hello
world

student@cc041-OptiPlex-3020:~$ mv file.txt file2.txt


student@cc041-OptiPlex-3020:~$ cat>file.txt
hii how are you
^C
student@cc041-OptiPlex-3020:~$ move head file.txt
Command 'move' not found, did you mean:
command 'mote' from snap mote (2.0.5)
command 'love' from snap love (11.2+pkg-d332)
command 'movx' from snap movx (2.0.1)
command 'love' from deb love (11.3-1)
command 'more' from deb util-linux (2.37.2-4ubuntu3.4)
command 'lmove' from deb suck (4.3.4-1build1)
command 'jove' from deb jove (4.17.3.6-2)
command 'mmove' from deb mtools (4.0.33-1+really4.0.32-1build1)
See 'snap info <snapname>' for additional versions.
student@cc041-OptiPlex-3020:~$ more head file.txt
more: cannot open head: No such file or directory
...back 1 page
::::::::::::::
file.txt
::::::::::::::
hii how are you
dog
cat
student@cc041-OptiPlex-3020:~$ head file.txt
hii how are you
dog
cat
student@cc041-OptiPlex-3020:~$ head -1 file.txt
hii how are you
student@cc041-OptiPlex-3020:~$ tail -1 file.txt

student@cc041-OptiPlex-3020:~$ tail file.txt


hii how are you
dog
cat
student@cc041-OptiPlex-3020:~$ tail -3 file.txt
dog
cat
student@cc041-OptiPlex-3020:~$ tail -2 file.txt
cat
student@cc041-OptiPlex-3020:~$ touch file3.txt
student@cc041-OptiPlex-3020:~$ cat file.txt file2.txt>file3.txt
student@cc041-OptiPlex-3020:~$ cat file.txt file2.txt>>file3.txt
student@cc041-OptiPlex-3020:~$ ls -d */
Desktop/ Documents/ Downloads/ juvanita/ Music/ Pictures/ Public/ snap/ Templates/ Videos/
student@cc041-OptiPlex-3020:~$ head -n 3 file3.txt
hii how are you
dog
cat

student@cc041-OptiPlex-3020:~$ head -v file3.txt


==> file3.txt <==
hii how are you
dog
cat

hello
hii how are you
dog
cat
hello
student@cc041-OptiPlex-3020:~$ rm file3.txt

You might also like