Linux Commands :
1 ) alias command
The alias command can be useful if you want to create a 'shortcut' to a command.
The format is alias name='command'
> alias home='cd /home/dave/public_html'
This will create an alias called home which will put you in the /home/dave/public_html directory whenever you type home at the command prompt. You can alias any command you want, and include options for the command.
> alias list='ls -la'
This will create an alias called list, which will use the ls command to print a long-style listing of all files in the current directory (the -l gives a long-style list, and the -a shows all files - including hidden files).
(Find out more about the ls command)
To see a list of aliases set up on your linux box, just type alias at the prompt.
> alias
alias attrib='chmod'
alias chdir='cd'
alias copy='cp'
alias cp='cp -i'
alias d='dir'
alias del='rm'
alias deltree='rm -r'
alias dir='/bin/ls $LS_OPTIONS --format=vertical'
alias edit='pico'
alias ff='whereis'
alias ls='/bin/ls $LS_OPTIONS'
alias mem='top'
alias move='mv'
alias mv='mv -i'
alias pico='pico -w -z'
alias rm='rm -i'
alias search='grep'
alias v='vdir'
alias vdir='/bin/ls $LS_OPTIONS --format=long'
alias which='type -path'
alias wtf='watch -n 1 w -hs'
alias wth='ps -uxa | more'
2 ) apropos Command
apropos find
Display all manual entries with the word "find" in the page name or description. Output will resemble the following:
1 ) alias command
The alias command can be useful if you want to create a 'shortcut' to a command.
The format is alias name='command'
> alias home='cd /home/dave/public_html'
This will create an alias called home which will put you in the /home/dave/public_html directory whenever you type home at the command prompt. You can alias any command you want, and include options for the command.
> alias list='ls -la'
This will create an alias called list, which will use the ls command to print a long-style listing of all files in the current directory (the -l gives a long-style list, and the -a shows all files - including hidden files).
(Find out more about the ls command)
To see a list of aliases set up on your linux box, just type alias at the prompt.
> alias
alias attrib='chmod'
alias chdir='cd'
alias copy='cp'
alias cp='cp -i'
alias d='dir'
alias del='rm'
alias deltree='rm -r'
alias dir='/bin/ls $LS_OPTIONS --format=vertical'
alias edit='pico'
alias ff='whereis'
alias ls='/bin/ls $LS_OPTIONS'
alias mem='top'
alias move='mv'
alias mv='mv -i'
alias pico='pico -w -z'
alias rm='rm -i'
alias search='grep'
alias v='vdir'
alias vdir='/bin/ls $LS_OPTIONS --format=long'
alias which='type -path'
alias wtf='watch -n 1 w -hs'
alias wth='ps -uxa | more'
2 ) apropos Command
apropos find
Display all manual entries with the word "find" in the page name or description. Output will resemble the following:
aa_find_mountpoint - find where the apparmor interface filesystem is mounted
chkdupexe - find duplicate executables
ffs - find first bit set in a word
ffsl - find first bit set in a word
ffsll - find first bit set in a word
find - search for files in a directory hierarchy
find2perl - translate find command lines to Perl code
findaffix - Interactive spelling checking
findfs - find a filesystem by label or UUID
findmnt - find a filesystem
findsmb - list info about machines that respond to SMB name quer...
glob - find pathnames matching a pattern, free memory from gl...
globfree - find pathnames matching a pattern, free memory from gl...
ippfind - find internet printing protocol printers
lfind - linear search of an array
locate - find files by name
memdiskfind - utility to search for a MEMDISK instance
mlocate - find files by name
mysql_find_rows - extract SQL statements from files
oldfind - search for files in a directory hierarchy
pidof - find the process ID of a running program.
texdoc - find & view documentation in TeX Live
tfind - manage a binary tree
tracediff - find and print differences between two traces
ttyslot - find the slot of the current user's terminal in some file
3 ) date Command
1. Name
date [man page] - print or set the system date and time
2. Synopsis
date [OPTION]... [+FORMAT]
date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
3. Frequently used options
-u, --utc, --universal : print or set Coordinated Universal Time
+%F : full date; same as %Y-%m-%d
4. Examples
date command is used to set and display time. By typing date command without any options and arguments the date command will display a current time:
linuxconfig.org:~$ date
Wed May 12 12:30:55 EST 2010
date command can also be used to set time. However, this requires superuser permissions. To set time to 20th March 2010 23:45:28 a following date command can be used:
linuxconfig.org ~# date 032023452010.28
Sat Mar 20 23:45:28 EST 2010
Linux date command can be very flexible as it offers more ways on how to set a time on your Linux systems: the next example we set date and time to "05 JUL 2021 01:55:56".
linuxconfig.org ~# date -s "05 JUL 2021 01:55:56"
Mon Jul 5 01:55:56 EST 2021
In case that we want to set just time but date a following syntax to date command can be applied:
Example:
linuxconfig.org ~# date +%T -s "18:30:01"
18:30:01
linuxconfig.org ~# date
Mon Jul 5 18:30:05 EST 2021
Linux date command is also capable to do some simple arithmetics as shown in the following example:
linuxconfig.org:~$ echo "Today is `date +%A` `date +%e`th of `date +%B` \
`date +%G` which is `date +%j`th day since 1th of January `date +%G`"
Today is Wednesday 12th of May 2010 which is 132th day since 1th of January 2010
After seeing your article I want to say that the presentation is very good and also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
ReplyDeleteangularjs2-Training in bangalore
angularjs2-Training in chennai
angularjs4-Training in chennai
angularjs5-Training in chennai
angularjs6-Training in chennai
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleterpa training in chennai | rpa training in chennai
rpa training in pune | rpa online training | rpa training in bangalore
This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
ReplyDeleteData Science Training in Chennai | Data Science training in anna nagar
Data Science training in chennai | Data science training in Bangalore
Data Science training in marathahalli | Data Science training in btm
Well researched article and I appreciate this. The blog is subscribed and will see new topics soon.
ReplyDeletejava training in chennai | java training in electronic city
java training in marathahalli | java training in btm layout