Tuesday, December 23, 2008

Navigation, find and searches

Show current directory
 [root]# pwd
 
Change directory
 [root]# cd ..
 [root]# cd ../../temp
 [root]# cd ~

List files in directory
 [root]# ls -a ---> list including hidden
 [root]# ls -F ---> list by file type
 [root]# ls -l ---> list long list
 [root]# ls -t ---> list by time-changed
 [root]# ls -u ---> list by time-accessed
 [root]# ls f080[1-6].jpg --> list using globbing

Find file
 [root]# find / -name httpd.conf
 [root]# locate httpd.conf
 [root]# find . -name "httpd.conf" -print

You can also install a UI based program called "mc" or Midnight Commander, to use GUI based file management
[root]# apt-get install mc
[root]# dnf install mc

No comments:

Post a Comment