Social Share

 

Hints & Tips on Learning Linux (FILES).

Linux logo on fmssltd.co.uk

Here are some Linux hints/tips that i have come across when learning to use Linux and i thought to share them with you.

These small little Linux command snippets that will enhance your use of the Linux command set.

Linux Code example 1)...

Display the manual for a Linux command

If you are unsure of the Linux Command you want to use or the options it offers, typing man then the command displays a manual for that command within Linux itself

Linux Terminal header bar on fmssltd.co.uk

root@fmssltd:~/home/user$ man ls

                 User Commands

NAME

      ls - list directory contents

SYNOPSIS

      ls [OPTION]... [FILE]...

DESCRIPTION

      List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Linux Code example 2)...

Display the Present working directory

Don't know where you are in the Linux directory structure typing pwd

displays the current working directory for you. Linux Terminal header bar on fmssltd.co.uk

root@fmssltd:~/home/user$ pwd

/home/user/desktop/pictures

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linux Code example 3)...

List the contents of the current directory

Want to know what files or directories are in the directory you are in, typing ls, displays a list of files & directories for you.

Linux Terminal header bar on fmssltd.co.uk

root@fmssltd:~/home/user$ ls

Holidays   Kids   adam.jpg   ben.jpg

Holidays & Kids = directories. adam.jpg & ben.jpg = jpeg images.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linux Code example 4)...

Change to another directory

You want to work in another directory, just typing cd with a directory after it, moves you to that directory. If the directory does not exist first check for a misspelling or use the ls command.

Linux Terminal header bar on fmssltd.co.uk

root@fmssltd:~/home/user$ cd Holidays

root@fmssltd:~/home/user/Holidays$