date +"%T.%N"returns the current time with nanoseconds.
date +"%T.%6N"returns the current time with nanoseconds rounded to the first 6 digits, which is microseconds.
date +"%T.%3N"returns the current time with nanoseconds rounded to the first 3 digits, which is milliseconds.
In general, every field of the
date command’s format can be given an optional field width.
- Command to get time in milliseconds
- Defining a variable with or without export
- What does set -e mean in a bash script?
- How to obtain the number of CPUs/cores in Linux from the command line?
- ./configure : /bin/sh^M : bad interpreter [duplicate]
- Pseudo-terminal will not be allocated because stdin is not a terminal
- What does $@ mean in a shell script?
- Is there a “goto” statement in bash?
- How to gzip all files in all sub-directories into one compressed file in bash
- Iterate over a list of files with spaces
- Efficiently test if a port is open on Linux?
- Bash script processing limited number of commands in parallel
- How to use sed to remove the last n lines of a file
- How do I remove newlines from a text file?
- How to force ‘cp’ to overwrite directory instead of creating another one inside?
- Redirect STDERR / STDOUT of a process AFTER it’s been started, using command line?
- Portable way to get file size (in bytes) in the shell
- What’s the magic of “-” (a dash) in command-line parameters?
- How do I get sed to read from standard input? [duplicate]
- Find all storage devices attached to a Linux machine [closed]
- How to execute ssh-keygen without prompt
- Multithreading in Bash [duplicate]
- How to give arguments to kill via pipe [duplicate]
- How do I get the absolute directory of a file in Bash?
- How to split a file and keep the first line in each of the pieces?
- How to run command as user who has /usr/sbin/nologin as Shell?
- What is /bin/dash?
- chsh: PAM authentication failed
- How to pass command output as several arguments to another command
- Execute a shell script in current shell with sudo permission
- does linux shell support list data structure?
- Redirecting output of bash for loop
- ssh script returns 255 error
- When grep “\\” XXFile I got “Trailing Backslash”
- Shell: redirect stdout to /dev/null and stderr to stdout [duplicate]
- How do I know if I’m running a nested shell?
- Removing part of a filename for multiple files on Linux
- List file using ls command in Linux with full path
- What does double slash // in `cd //` mean in Linux? [duplicate]
- How to send list of file in a folder to a txt file in Linux
- Use sudo without password INSIDE a script
- Bash variables: case sensitive or not?
- check if file exists on remote host with ssh
- Comparing two unsorted lists in linux, listing the unique in the second file
- Identifying received signal name in Bash
- Running shell script in parallel
- Copy multiple files from one directory to another from Linux shell [closed]
- How to delete the first column ( which is in fact row names) from a data file in linux?
- Is there a way to find the running time of the last executed command in the shell?
- Is it possible to recursively create folders using a shell script?