12/28/2023 0 Comments Gedit python file turn line numbers on![]() ![]() Top you can see the utilization statics for resources and get PID of all running process : It will show the status of various resources and tasks Wc –c file_name T count total characters only Wc –l file_name To count total new lines in the file Wc file_name Newline, word and byte count in the file : find the difference between two files/dirĭiff file1 file2 To check the difference between two filesĭiff dir1 dir2 To check the difference between contains of two dir Grep –i words file_name display the line contains searched wordĭmesg | grep sda filtered the output and show only line having sdaĭmesg | grep sda –A 5 Display 5 lines after the matching word sda ![]() Less -N file_name Will show the content with line number Similar to more command with some advance features Less file_name To view the content of a file : to read the text file in the command line More -10 file_name will display 10 lines at a time More file_name display the text in command line Unique file_name will display only unique lines ![]() : An utility for filtering the repeated lines in a file Sort –n -k2 file_name sorting the file on basis of the nth column Sort –o outputfile inputfile redirection of sorted output Sort –r file_name sorting the file in reverse order ![]() Sort –n file_name sorting a file which has numbers Tail –n 12 file_name To read last 12 lines of a file OR tail -2 file Tail file_name To read last 10 lines of a file : To read the last 10 lines in the command line Head -4 *.log Read first 4 lines of all log files in PWD Head –n 8 file_name To read first 8 lines of a file OR head -8 file Head file_name To read the first 10 lines of a file : To read the first 10 lines of a file in CLI Gedit file1 create/open a file in geditor Gedit & open gedit text editor and release the CLI Touch –am file2 change access and modification time Touch file1 file2 file3 create multiple files in one command Which python Will show the installation path of the python programįind / -name “dir_name” to find a file/dirįind /home/user_name -name “file_name” to find a file/dir only in user’s home area Which virtuoso Display the path of the executable file for virtuoso txt in PWDĬat file_name Display a contain of a file in CLIĬat text1 > text2 redirection of text, overwrite Rm *.txt Will remove all the file having extension. ! One of the dangerous commands for root, use carefully!!! Mv -rf recursive and force moving of a directory To copy a file to current directory (“.” means current dir)Ĭp -f source_file destination_dir To copy forcefully a regular fileĬp -R source_file destination_dir To coppy recursive a directory : create and edit a file using command-line interfaceĮSc Exit from edit mode and Switch to command modeĬp source_file destination_dir To copy a fileĬp source_file. Gedit /path/to/file_name create and edit a file in specified location Touch –m file_name to change the file modification time Touch –a file_name to change file access time Touch file1 file2 file3 To create multiple files Mkdir dir1 dir2 dir3 To create multiple directories in a single step. Mkdir directory_name To create a new directory with the given name. : Change Directory, to move to another directory.Ĭd ‘abc xyz’ go to a directory whose name contain white space : Print Working Directory, The directory where you are currently. : Show a manual of command and switches written in details. : clear the terminal (but keep the history of commands intact) Ls -lart lists all the files and directories in order of last modified. Ls -t lists the files/directory on basis of modification time – normal, d- directory, s-socket file, l-link file Ls -l indicates file/directory type, permissions, owner, size, last modified ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |