39. Example for command Example Command option argument ls - ls not used - ls –l - ls -l not used ls *.c - ls not used *.c ls -l file1 - ls -l file1 Consider a command ls. ls - helps to list out the contents of directory
40.
41.
42.
43.
44.
45.
46.
47.
48.
49. Variety examples – cd command From current directory to its subdirectory called personal cd ~/personal Moves to the directory bin whose path is entirely different from current directory. cd /user/bin Moving to its subdirectory cd .. / health To home directory cd ~ To home directory. cd Moving to parent directory of the current directory cd .. Purpose Command
50.
51.
52.
53.
54.
55. Variety examples – ls command Lists the information about the current directory ls Any of these commands lists all files including hidden files along with their information. ls –al ls –la ls –a-l ls –l–a . to list hidden files also ls –a to list more information about the files and sub directories ls –I The option -F adds / at the end of the directories and sub-directories ls –F Purpose Command
56. Options used with ls command Displays the files of almost all directories except the . and .. Directories -A Sorts by file size. -s Displays files and sub-directories in the reverse order. -r Lists Working Directory as well as all sub-directories. -R Shows the file type along with the name (‘/’is added at the end of each directory to distinguish it from file). -F Lists all the files including hidden files. -a Function Option