linux:fileoperation
Find Files on Linux
a) Find Files on Linux with find
find / -name yourfiles
b) Find Directory on Linux with find
find / -name yourdirectory -type d
c) Find File on Linux and execute
find / -name yourfile -exec rm {} \;
d) Find Directory on Linux and execute
find / -name yourdirectory -type d -exec rm {} \;
e) Find Files on Linux with locate
updatedb locate yourfiles
e) Find Files on Linux with slocate security
updatedb
slocate yourfiles
Create an empty File on Linux
a) Create an empty file
touch yourfile
Remove File or directory on Linux
a) Remove File on Linux
rm yourfile
a) Remove Directory on Linux, -f Force, -R Recursively
rm -fR yourdirectory
List File or directory on Linux
a) List File or Directory on Linux
ls
linux/fileoperation.txt · Last modified: 2016/06/07 10:47 by admin