UP TO 80% DISCOUNT ON AMAZON LIMITED TIME ...

Sunday, 2 August 2015

Linux Terminal Commands-2

Linux Terminal Commands-2


File Permissions commands:

DescriptionShortcut key
Change the permissions of file to octal, which can be found separately for user, group, and world by adding: 4-read(r), 2-write(w), 1-execute(x)chmod octal file
read, write, execute for allchmod 777
rwx for owner, rx for group and worldchmod 755

File commands:


DescriptionShortcut key
Directory listingls
List files in current directory using long formatls -l
List all files in current directory in long format and display in columnsls -laC
List files in current directory and indicate the file typels -F
Formatted listing with hidden filesls -al
Change directory to dircd dir
Change to homecd
Create a directory dirmkdir dir
Show current directorypwd
Remove a file or directory called namerm name
Delete directory dirrm -r dir
Force remove filerm -f file
Force remove an entire directory dir and all it’s included files and subdirectories (use with extreme caution)rm -rf dir
Copy file1 to file2cp file1 file2
Copy dir1 to dir2; create dir2 if it doesn't existcp -r dir1 dir2
Copy the filename called file to the /home/dirname directorycp file /home/dirname
Move the file called filename to the /home/dirname directorymv file /home/dirname
Rename or move file1 to file2; if file2 is an existing directory, moves file1 into directory file2mv file1 file2
Create symbolic link link to fileln -s file link
Create or update filetouch file
Places standard input into filecat > file
Display the file called filecat file
Display the file called file one page at a time, proceed to next page using the spacebarmore file
Output the first 10 lines of filehead file
Display the first 20 lines of the file called filehead -20 file
Output the last 10 lines of filetail file
Display the last 20 lines of the file called filetail -20 file
Output the contents of file as it grows, starting with the last 10 linestail -f file

No comments:

Post a Comment