Quality Testing

Quality is delighting customers

UNIX Commands

Command

Description

File System Commands

ls

To List all the files

ls –l

To list all the files with properties like file type, owner, group, permissions, last modification time, size etc

cp file1 file2

Copies file1 to file2

cp –r dir1 dir2

Copy dir1 to dir2

rm file1

Removes file1

mkdir dir1

Creates Directory named dir1

cd dir1

Change to dir1

cd..

Change to parent directory

rmdir dir1

Removes directory dir1. (Directory should be empty)

rm –r dir1

Removes directory dir1 including contents

pwd

Displays present working directory

rm –i file

Removes the file interactively

rm –f file

Removes the file forcibly

mv file1 file2

Renames file1 to file2. (Can also be used for directories)

ls -a

List all files including hidden files.

cat > filename

echo > filename

vi filename

touch filename

To create a new file. Press CTRL+C to stop writing to file through cat command. Touch will create file size of zero bytes.

Process Management

ps

Will display the list of process running

ps –aux

Will give the full details like pid, ppid, cpu utilization etc..

bg processname&

Puts a process as background process (i.e it can’t take the data from the terminal)

fg

Brings the processes to foreground

Top

Displays the list of processes, which are taking the top system resources.

User Management

adduser username

Add New user to operating system

passwd username

Changes user password to new password

Quota

Displays the quota of memory for a user

Views: 71

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service