Tag Archives: linux command

SheBang (#!) in linux/unix with examples and use cases

The script shebang (#!) Is explained in linux / unix. What is shebang, what is the shebang syntax, why should shebang be used, and shebang use cases. Continue reading

Posted in Text Processing | Tagged , , , | 1 Comment

which command tutorial in linux/unix with examples and use cases

Linux which command does this by searching the PATH for executable files matching the names of the arguments. It returns the pathnames of the files (or links) which would be executed in the current environment. Continue reading

Posted in System | Tagged , | Comments Off on which command tutorial in linux/unix with examples and use cases

Create a file in linux, you can do this!

Create a file in linux, Examples:
use the linux touch command create an empty file;
use the linux vim/vi command;
use the linux cp command;
use the redirect “>” or “>>”. Continue reading

Posted in File & Directory, How to | Tagged , | Comments Off on Create a file in linux, you can do this!

How to merge/convert multiple files into one file in linux

Merge/convert multiple files in linux.Examples:
Merge multiple files into one file,
sort and deduplicate multiple files and import one file,
sort multiple files and export duplicate content to one file Continue reading

Posted in Text Processing, How to | Tagged , | Comments Off on How to merge/convert multiple files into one file in linux

How to print tree directory structure in linux/unix

Print tree directory structure in linux.

Print the tree directory structure using the tree command;
Print multilevel tree directory structure using the find and awk combined Continue reading

Posted in How to, Awk Command, Text Processing | Tagged , , | 1 Comment

How to display the first line and the last few lines of a file in Linux

In linux, print the first line and the last few lines of the file. Print the first line and the last 10 lines of the file.Print the first line of the file and the last 10 to 15 lines of the file Continue reading

Posted in How to, File & Directory | Tagged , , | 1 Comment

How to count the number of lines of file in Linux

In Linux, Count the total lines number,Count the total number of non repeating lines,Count the total number of duplicate lines,Count the number of times specific content Continue reading

Posted in File & Directory, How to | Tagged , | Comments Off on How to count the number of lines of file in Linux

uniq command tutorial in linux/unix with examples and use cases

linux uniq command – report or omit repeated lines. Which usually requires sorted input, compares and ranks only on adjacent lines. Continue reading

Posted in File & Directory | Tagged , | Comments Off on uniq command tutorial in linux/unix with examples and use cases

nohup command tutorial in linux/unix with examples and use cases

When the linux nohup command is used to run jobs (scripts) in the background, it can ignore the hangup signal and cooperate with output redirection to achieve long-term jobs (scripts) run in the background. Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on nohup command tutorial in linux/unix with examples and use cases

setsid command tutorial in linux/unix with examples and use cases

Linux setsid command is usually used when you need to run scripts in the background. It is not affected by the terminal hangup signal. Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on setsid command tutorial in linux/unix with examples and use cases

How to use top sort by cpu and by memory in linux

top sort in linux. examples: top sort by CPU in linux, top sort by memory in linux, top sort by pid in linux, top command supports sorted fields… Continue reading

Posted in Monitor, How to | Tagged , | Comments Off on How to use top sort by cpu and by memory in linux

sort command tutorial in linux/unix with examples and use cases

linux sort command – sort lines of text files.examples:separate fields and sort by key, sort file, sort file/directory sizes in human readable format, sort multi column sort Continue reading

Posted in File & Directory | Tagged , , | Comments Off on sort command tutorial in linux/unix with examples and use cases

How to find and delete old linux files or directories

linux delete old files script,linux delete old files by date,linux delete old files cron, scheduled task delete files older than,find and delete files older than X days Continue reading

Posted in File & Directory, How to | Tagged , , | Comments Off on How to find and delete old linux files or directories

linux pkill/pgrep commands tutorial: pkill/pgrep syntax and examples

linux pkill/pgrep commands:
– Syntax
– Options
– Examples:
— List all processes whose names contain SSH and pid
— Kill all processes with a given partial name
— Kill all processes of the specified user
— Kill all processes of the specified terminal
Continue reading

Posted in How to | Tagged , | Comments Off on linux pkill/pgrep commands tutorial: pkill/pgrep syntax and examples

Share some linux prank commands

linux prank commands:
– linux sl command
– linux cowsay/cowthink commands,
– linux cmatrix command
– linux figlet / toilet commands
– linux yes command
– linux oneke command Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Share some linux prank commands