To delete files with names with special charactes, who can't be deleted by simply issuing a simple rm command, proceed with the following method.
In the following example I suppose to have to delete a directory with the following name
'='0&parent=19&id_cat=21&offset=-4&id_prodotto=102
created by an attack on a site in /var/www
- Find the inode of the file or the directory you want to delete with the following command
ls -ilath /var/www
- Delete the file with the inode you found with the previous command
find . -inum 101004 -exec rm {} \;
To check the version on your Centos from terminal issue the following command
cat /etc/redhat-release
Change default crontab editor on Ubuntu
When you edit crontab for the first time on a Linux Ubuntu you will be asked which editor you want to use.
If you want to chage your first choice, maybe after adding another editor to your Ubuntu installation you may issue the following command
select-editor
Backup your bash history to a file
Flush the history to the file
history -w historybackup.txt
where historybackup.txt is the file name where to save your history.
Clear bash history completely
Flush the history to the file
history -w
Clear the history
history -c
Count the number of file in a directory from terminal type:
find folder -type f | wc -l
Change keyboard layout from terminal type:
dpkg-reconfigure keyboard-configuration