-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gist_misc.txt
22 lines (17 loc) · 938 Bytes
/
Gist_misc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Software: Terminal commands
Developer: GNU Find /findutilities project/Open source
Developer: sdiff original author Thomas Lord
Purpose: General purpose commands
BASH Documentation: Vivek Gite https://bash.cyberciti.biz/guide/Main_Page
Find Documentation: https://linux.die.net/man/1/find
sdiff Documenation: https://linux.die.net/man/1/sdiff
To Run Sample: Cntl-Alt-T to open a new terminal. Type sample command.
#Find and count all file and directories in source directory:
find /home/bcadmin/Desktop/source/ | wc -l
#Find and count all files in source directory:
find /home/bcadmin/Desktop/source/ -depth -type f | wc -l
#Find top 20 largest files in a directory:
#reference Vivek Gite https://www.cyberciti.biz/faq/linux-find-largest-file-in-directory-recursively-using-find-du/
sudo du -a -h source | sort -n -r | head -n 20
#Difference between files:
sdiff ~/Desktop/compare1.txt ~/Desktop/compare2.csv --suppress-common-lines