# Login as a root:
or to list only the latest
# To install dependencies
# To empty the Trash
# To find the process id's of given process and its related things
# Execute The Last Executed Command
# Execute The Last Command Starting With.. S
# Run a Command Repeatedly and Display the Output. Watch runs command repeatedly, displaying its output (the first screenfull). This allows you to watch the program output change over time. By default, the program is run every 2 seconds. watch is very similar to tail.
This will watch the current directory for any file changes and highlight the change when it occurs.
# Save Quickly in VI/VIM. If you’re in a hurry, you can save and quit the file you’re editing in vi by exiting insert mode, holding shift, and hitting z twice.
# Quickly Log Out of a Terminal
# Navigate to the Last Directory You Were In
# Make Parent Directories the Smart Way
# To Set custom time stamp of a file
will show the time stamp as 2008-01-01 8:00. The format is (YYMMDDhhmm).
# To print the files content which names are all start with ho*
# To print all the hardware details
for html output
# To list all the installed packages
to list the installed paths
# To search a pattern in files
# To disable power button action
# To display all the USB Devices connected
sudo su -# To start a root shell (i.e. a command window where you can run root commands), starting root's environment and login scripts, use:
sudo means 'super user do'.
sudo -i (equivalent to sudo su - , gives you roots environment configuration)# Start a root shell, but keep the current shell's environment, use:
sudo -s (equivalent to sudo su)# To execute more than one cmd use '&&' like
$ make && make install# To search for a pacakage
$ sudo aptitude search
$ sudo aptitude show
$ apt-get build-dep
$ rm -rf ~/.Trash/* $ sudo rm -rf ~/.local/share/Trash/files/*
$ pgrep
$ !!
$ !s
$ watch -d ls -l
# Save Quickly in VI/VIM. If you’re in a hurry, you can save and quit the file you’re editing in vi by exiting insert mode, holding shift, and hitting z twice.
# Quickly Log Out of a Terminal
$ CTRL+d
$ cd -
$ mkdir -p /home/adam/make/all/of/these/directories/
will create all sub directories as needed even if it is not.
$ touch -c -t 0801010800 filename.c
# To print the files content which names are all start with ho*
$ ls -l |grep -v ho*
$ lshw
$lshw -html > path/sys.html
$ dpkg -l
$ dpkg -L
$ find -R "pattern" *
$ chmod 000 /etc/acpi/powerbtn.sh
$ lsusb
No comments:
Post a Comment