User Tools

Site Tools


linux:fileoperation

This is an old revision of the document!


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

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
linux/fileoperation.1465289053.txt.gz · Last modified: 2016/06/07 10:44 by admin