2.0 File Management
To search for a file by name
First run “updatedb” This updates files index on the system.
Once this is done find a file use the locate command
filenameCopying, Moving, renaming files
Move a file to a directory
mvmv test test2 simply moves test to the test2 file, note its like renaming it.
Copy a file. You can copy a file to a directory and also rename it while copying
cp filename /etc/filenamecp can also be used to copy directories. Example cp -r /root/mail /usr/local-f will force the copy-p will copy permissions
Make a directory
mkdirmkdir can make a directory anywhere ex mkdir /etc/sysconfig/testdir
Remove a file and can also be used to rm directories
rmTo remove an entire directory and its contents, type
rm -rf /directory
where "/directory" isthe path to the directory that you want to delete.rm -Rf /root removes everything in your /root directory without prompts, DON'T DOTHIS!!!!
Remove empty directories
touch creates an empty file
Turn FTP on You need to modify the /etc/inetd.conf with an ftp line like below
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd