Nt1330 Unit 7 Lab 3

571 Words3 Pages
Perhaps many are confused about the existing commands linux, this time I will discuss about the linux basic commands used along with examples of its use. 1: Seeing identification (id and group id number) $ Id 2: Looking the calendar date of the system a. Looking at the current date $ Date b. See calendar $ Cal 9 2002 $ Cal -y 3: Seeing the machine identity $ Hostname $ Uname $ Uname -a 4: See who is currently active a. Know anyone who is active $ W $ Who $ Whoami b. Changing finger information $ Chfn Changing finger information . Password: Name [user wks]: Office []: Programming Lab 2 Office Phone []: 2301 Home Phone []: 5947280 Finger information changed. c. View information finger $ Finger $ Finger 5: Using the manual…show more content…
Featuring a complete file or directory that is composed of a file name, size, date modified, owner, group, and mode or attributes. $ Ls -l / etc i. Show all files and directory contents. This argument will cause the process run a little long, if the process will be terminated can use ^ c $ Ls -R / usr 10: Viewing the file type $ File $ File * $ File / bin / ls 11: Copying files a. Copying a file. Give the option - i for interactive question if the file already exists. $ Cp / etc / group f1 $ Ls -l $ Cp -i f1 f2 $ Cp -i f1 f2 b. Copy to directory $ Mkdir backup $ Cp f1 f3 $ Cp f1 f2 f3 backup $ Ls backups $ Cd backup $ Ls 12: Viewing the contents of a file a. Using instruction paint $ Cat f1 b. Displays files in full screen $ More f1 $ Pg f1 13: Renaming files a. Using instruction mv $ Mv f1 prog.txt $ Ls b. Transferring files to another directory. If the last argument is the name of the directory, the files will be transferred to the directory. $ Mkdir mydir $ Mv f1 f2 f3 mdir 14: Deleting files $ Rm f1 $ Cp mydir / f1 f1 $ Cp mydir / f2 f2 $ Rm f1 $ Rm -i f2 15: Looking for a word or phrase in the file $ Grep root / etc / passwd $ Grep ": 0:" / etc / passwd $ Grep student / etc /

More about Nt1330 Unit 7 Lab 3

Open Document