Basics of Linux - Some More Basic Commands



Some More Basic Commands

ls  (list of files in current directory)
ls -l (long listing of files)
ll  (an alias for ls -l)
ls -lh (size of files is displayed in Human Readable format)
ls -t (sort the output in descending order with the latest modified file at the top)
ls -r (reverse the sorting)
locate <filename> (will try to find the specified file by looking up the system database of files prepared by updatedb)
updatedb (creates or updates a database used by locate)
find <path-to-search> <filename>
df -h (display list of partitions in human readable format)

Getting Around in Linux

Change Directory
pwd (Print Working Directory)
cd /var/log/ (will change current working directory to the specified dir)
cd ~ (Jump to current user’s home directory)
cd ~skywalker (Jump to username:skywalker's home directory)
cd -  (Move to the previous directory)
cd .. (Move one level up)

Comments

Popular Posts