Print sequences of numbers in Linux
Answer:
To generate a sequences of numbers from 1 to 99, you can try the `seq` command, e.g.
# seq 1 99
To reverse from 99 to 1, simply
# seq 99 1
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Print sequences of numbers in Linux
Answer:
To generate a sequences of numbers from 1 to 99, you can try the `seq` command, e.g.
# seq 1 99
To reverse from 99 to 1, simply
# seq 99 1
What is the meaning of kill -0?
Answer:
They are usually used to check if a given PID really exist or not (no side effect on Linux).
E.g.
# kill -0 3182
-bash: kill: (3182) - No such process
# kill -0 3184
# nothing will be returned if process really exists.
How to diff two files side-by-side
Answer:
To diff two files side-by-side, you can try the -y argument.
# diff -y file1.txt file2.txt
How to search for tab characters in a file?
Answer:
The most intuitive way to search for tab characters in a file
# expand file.txt | diff - file.txt
How to find file by inode number
Answer:
To find a file by its inode number, you can use the argument -inum with the find command. e.g.
# find -inum 8232976
./test.txt
./hard_link.txt